

LLVM-powered Mono - pieter
http://tirania.org/blog/archive/2009/Jul-16.html

======
ShabbyDoo
What is the cost to the project of maintaining their own JIT optimizing
compiler? I presume, knowing nothing of LLVM other than what I have read, that
it will continue to improve in performance with or without Mono or any other
single platform on top of it. Let's presume that the Mono developers switch to
LLVM as their sole target platform. What else could they spend their time on
if they don't have to worry about a JIT?

Note that I'm not necessarily asking these questions rhetorically -- I don't
know a lot about this technology stack and want to validate my core
assumptions.

~~~
s3graham
I think it depends. LLVM is a very large project which adds a significant
overhead to your footprint. LLVM also historically has focused on "normal"
(i.e. AOT) compilation so is more concerned about generating good code even if
it takes a while (which isn't the main focus for MS CLR, or Mono's JIT). LLVM
have improved their x86 -O0 perf, but it's still not as fast as the fast path
on JIT-focused backends.

So, yeah, there's a cost. Depends what the end user is using Mono for as to
whether it's worth it or not I guess.

------
nihilocrat
_But computationally intensive applications will definitely benefit from this.
Financial and scientific users will surely appreciate this performance boost._

Or... uhm.... _game developers_...

------
dtf
Seems like it would be nice to apply LLVM -O3 selectively, perhaps with some
kind of pragma/directive in your code, and use the mono JIT as usual for the
rest. Is this a possibility? I often know where my performance hotspots are,
but switching languages and writing an external library in C is a drudgery.
Would it be possible to get close to gcc/C performance for some restricted
subset of C# when compiled with LLVM?

~~~
kumpera
There have been some talks since the announcement of Mono.SIMD about providing
JIT hints.

There is a partial patch on mono's mailing list archives that provides initial
infrastructure for querying for those hints. The initial idea was to provide
inlining hints for caller and callee.

If you feel inclined to have such thing, please drop by our irc channel or
mailing lists to discuss this and contribute some code.

------
tragiclos
_LLVM is not able to support some of the features that Mono needs, so in those
cases the JIT compiler will still fall back to Mono's JIT engine (methods that
contain try/catch clauses or methods that do interface calls)._

Who uses exceptions, anyway?

