[Mono-list] Need some short answers on the new Mono JIT / Mini

Miguel de Icaza miguel@ximian.com
27 May 2003 16:37:04 -0400


Hello,

> - My first question is: were can I find the document on mini that is
> mentioned in the release notes???
> I searched the Mono TAR files but I cannot find it. I don't know if it is
> stored in CVS.
> I have no experience with CVS , who can help me out here?

Its included in the source tarball:

	mono-0.24/mono/mini/mini-doc.txt

> - If I start a program I can use the option -O=all to enable all
> optimizations.
> Which optimizations are used when I do not use the -O option, what are the
> default optimizations ???

The optimizations will likely change over time, but the ones that are
currently enabled for your build are in:

	mono/mono/mini/driver.c

Grep for "opt = "

> - I assume that the mono JIT compiles the code on a method basis (like MS
> JIT).
> Based on this assumption I measured the time for the first and second
> invocation
> of a very small method. The idea is that on the first invocation the JIT
> comes into action
> and as a result the time to execute the method is longer than for the second
> invocation.
> ( I executed this test on run-level 1 so that very few process are running)
> On my machine (1333MHz) I measured an initial threshold of ~200us.
> 
> However if I use the -O=all option the difference in duration between the
> first
> and the second invocation is almost zero!!
> So in other words there is no initial cost for the JIT.
> Can anybody explain why this is???????????

The method might have been inlined, hence you did not have visibility
into its cost.

Miguel