[Mono-dev] What is the state of mono interpreter ?

Miguel de Icaza miguel at novell.com
Wed Oct 1 14:04:44 EDT 2008


> I would value an interpreter not as a replacement for JIT in a full mono
> stack, but as a way to create a very small footprint runner for CLR
> code, with a really cut-down runtime.  This would be competing more
> with a Lua usecase than anything else.

The memory consumed by the JIT is fairly small, the actual overhead of
running Mono applications comes from the class library stack.

An interpreter would save only a minor amount of memory, and most likely
would consume as much or more than the JIT.  Here is why:

Interpreters for CIL code are not every efficient due to the fact that
CIL instructions do not have type annotations, so the type annotations
have to be fetched from the stack, which further slows down execution.
Additionally token lookups (for fields, methods, types) are very

So an effective interpreter ends up compiling from CIL code into a
different bytecode, one that has most of these expensive operations
"resolved", so you end up keeping this information around, very much
like you would end up keeping the code around.


More information about the Mono-devel-list mailing list