Linked by Thom Holwerda on Fri 17th Jul 2009 10:45 UTC
Mono Project Mono from SVN is now able to use LLVM as a backend for code generation in addition to Mono's built-in JIT compiler. "This allows Mono to benefit from all of the compiler optimizations done in LLVM. For example the SciMark score goes from 482 to 610. This extra performance comes at a cost: it consumes more time and more memory to JIT compile using LLVM than using Mono's built-in JIT, so it is not a solution for everyone. Long running desktop applications like Banshee and Gnome-Do want to keep memory usage low and also would most likely not benefit from better code generation. Our own tests show that ASP.NET applications do not seem to benefit very much (but web apps are inherently IO-bound). But computationally intensive applications will definitely benefit from this. Financial and scientific users will surely appreciate this performance boost."
Permalink for comment 373902
To read all comments associated with this story, please click here.
RE[2]: Slow JIT
by ba1l on Fri 17th Jul 2009 15:28 UTC in reply to "RE: Slow JIT"
ba1l
Member since:
2007-09-08

There are several types of optimization algorithms and during the execution of you program the VM (JVM, CLR, and so on) might reach the conclusion that a certain piece of code would benefit from a different type of optimizations and so recompiles the code again.


Neither Mono nor Microsoft's .NET runtime do this. They both behave the same as Java's client VM - JIT the code once, the first time it's called, and try to balance runtime speed with JIT time.

Java's server VM does as you describe. It's equivalent to using profile-guided optimization in C/C++ compilers, except it's automatic. It also turns on a lot of compiler optimizations that are too expensive to perform in an interactive application.

.NET doesn't have this. It does have an offline compiler, which pre-JITs an entire assembly with all the compiler optimizations turned on. The JIT doesn't do anything at all at runtime.

Reply Parent Bookmark Score: 3