[Mono-list] Performance issue

Klas Lindberg klasa@hl.lu.se
Mon, 10 Sep 2001 17:03:04 +0200


> C# is compiled to IL which is stack-based, and then JITted to native 
> assembler. The JITter doesnīt have enough time to optimize the code a
> lot, so itīs kind of natural thing to expect that C# and VB.NET, and every
> other language compiling managed code will perform slower than C/C++ compiled
> to native instructions.

Hello everyone. I've been busy reading up and doing other things for a while, but this is stuff I like :-)

The penalty for running in a stack based environment would be very visible in cases where small sets of variables get updated a lot. Applications of this kind get extraordinary speedups from good register colouring -- an optimization which is not possible to do before runtime/native compilation with languages such as CIL. This means that some programs you may write will run up to 8 times faster if compiled natively even if only this one optimization is used.
IMO, we should use the SSA framework during CIL generation and save all other kinds of optimizations for JIT compilation. If anyone is looking into optimizations possibilities right now, please let me know.