[Mono-list] F# support on mono, performance

Jon Harrop jon at ffconsultancy.com
Mon Feb 1 21:19:14 EST 2010

On Monday 01 February 2010 13:59:41 Rodrigo Kumpera wrote:
> On Mon, Feb 1, 2010 at 11:33 AM, Jonathan Shore 
<jonathan.shore at gmail.com>wrote:
> > I've also been back-reading on the LLVM vs mono code-generation debate.
> > At this point the main concern stated in not moving over to LLVM
> > completely is the slower JIT'ing in LLVM.    Surely there are different
> > levels of JIT optimisations that can be turned on or off within LLVM?
> LLVM is significantly slower than mono's JIT even if we no optimizations
> are done and the fast inssel backend is used.

JIT compiling a program to solve the n-queens problem on a 1x1 board to 
measure the JIT time:

Mono 2.4:      0.210s
Mono 2.6:      0.182s
Mono 2.7+LLVM: 2.458s

However, JIT compiling and running the same program using HLVM (which uses 
LLVM) takes only 0.241s.

> > At this point LLVM has matured and gained enough momentum that one would
> > suspect that it is more "expensive" for mono development to enhance its
> > own code generation than adopt LLVM.    I raise this issue as there are a
> > number of things that LLVM does quite a bit better.   The effort focused
> > on in-house code generation could be focused on a better more complete
> > LLVM / LLVM-mapping.     Just speaking as a 3rd party looking-in ...
> Today it's not possible to completely switch to LLVM since, for example, it
> runs on less archs than mono does

Mono runs on s390x, IA64 and HPPA but LLVM does not. However, LLVM has code 
gens for PowerPC 64, Thumb, CellSPU, PIC16, MSP430, SystemZ and XCore but 
Mono does not.

Dr Jon Harrop, Flying Frog Consultancy Ltd.

More information about the Mono-list mailing list