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."
Member since:
2007-09-08
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.