BT

Mono 2.2 Has a Linear Code Generation Engine

| by Abel Avram Follow 12 Followers on Jan 22, 2009. Estimated reading time: 1 minute |

Until now Mono’s code generation engine was based on a tree Intermediate Representation (IR) of the code. Version 2.2 has a new engine based on a linear IR, which brings significant speed and code size improvements.

The previous tree-based IR made it “difficult to improve code generation and extend the JIT engine in meaningful ways”, according to Miguel de Icaza. The new linear IR helps to “improve the visibility of register usage to the register allocator, so it can make better choices when producing code”.

Work on the linear IR started in late 2005. The work progressed but the Mono team did not want to include the new engine into 2.0 due to the significant amount of work involved. Now, that the 2.2 version has been released, Mono has the new engine.

The most important effect of the change is shown by the benchmark results:

Speed: The engine will mostly benefit computationally intensive code, usually between 10% and 30% performance increase, with some cases going up as high as being 50% faster.

Code size: the new engine generates slimmer code, typically 12% to 20% smaller code generated.

Those interested in the details regarding the new engine can get them from Mono’s web site. The Release Notes for 2.2 mention the following main improvements: increased performance, support for full ahead of time compilation, support for monitoring through PerformanceCounters, attaching code live, SIMD support and others.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss
BT