[Mono-dev] C# to x86 assembly code?

Jonathan Gilbert 2a5gjx302 at sneakemail.com
Mon Sep 18 15:27:03 EDT 2006


At 08:44 PM 18/09/2006 +0200, Marcos  wrote:
>Hi Auge,
>
>You can currently use Mono AOT compilation (Ahead-Of-Time; "mono
>--aot" I think) in order to get a precompiled binary, It'll cause your
>application to run faster, between some other things.

More specifically, it will cause the application to start up faster. The
actual run speed in practice shouldn't be noticeably different from
on-the-fly JITted code. It's the same engine, after all, emitting the code.
:-)

In theory, when doing ahead-of-time compilation, the compiler can do more
expensive optimizations and possibly produce better machine code. On the
flip side, theory also says that the JIT can make certain assumptions that
make the output code simpler or faster when it can see the whole picture --
the application when it is actually running. I believe inlining falls into
this category, since calls into other assemblies are susceptible to the
other assembly being swapped for a different version, but at runtime that
problem disappears since once loaded, the assembly is guaranteed to remain
the same version (and remain loaded, too). I don't know to what extent mono
takes advantage of either of these points.

Jonathan Gilbert



More information about the Mono-devel-list mailing list