[Mono-dev] Mono runtime performance

Jonathan Pryor jonpryor at vt.edu
Tue Sep 20 21:12:20 EDT 2005


On Tue, 2005-09-20 at 14:09 -0400, Joe Shaw wrote:
> Is there a reason why all optimizations aren't on by default?  I didn't
> see anything in the mono man page, but I suspect there has to be some
> tradeoff.

There's a time tradeoff -- more optimizations requires more time to JIT
the code, slowing down application startup.  So you can have a quickly
starting app, or a quickly performing app, but not both. :-)

(Well, you can finagle "both" by picking and choosing the optimizations
you use wisely, which is what the default -O setting does.)

> And what, if any, optimizations are on by default?

The default optimizations are listed in
mono/mono/mini/driver.c:DEFAULT_OPTIMIZATIONS:

        #define DEFAULT_OPTIMIZATIONS ( \
                MONO_OPT_PEEPHOLE |     \
                MONO_OPT_CFOLD |        \
                MONO_OPT_BRANCH |       \
                MONO_OPT_LINEARS |      \
                MONO_OPT_INTRINS |  \
                MONO_OPT_LOOP |  \
                MONO_OPT_AOT)

Which should map to -O=peephole,cfold,branch,linears,intrins,loop,aot.

 - Jon





More information about the Mono-devel-list mailing list