[Mono-dev] high-freq use of compiler as a service or reflection.emit

Jonathan Shore jonathan.shore at gmail.com
Wed Feb 15 13:23:20 UTC 2012


Is there any approach that will use LLVM to JIT the emitted bytecode?   Also will LLVM be used on non-dynamically inserted  bytecode called by the emitted code?  If I have the following call sequence:

	caller -> dynamically emitted code -> precompiled bytecode

Where "->" means calls.   I have performance sensitive code that would be called by the emitted code.  Want to make sure that it would be JITed with LLVM (which I've seen to be often 2x faster), in spite of going through a dynamic code path (which appears to be JITed with the mono JIT compiler).   

On Feb 15, 2012, at 4:41 AM, Marek Safar wrote:

> Hello,
>> I have an application where rules are generated (as part of a genetic algorithm).   Rather than evaluate the rules in interpreted form (which are 5x or more slower than the equivalent compiled code), thinking to use reflection.emit or the mono compiler as a service.
> Compiler as a service is most likely too heavy weight for you, it does all complicated logic behind C# and unless your input rules are very complex you won't benefit from it.
> 
> I think the most suitable options for you would be System.Linq.Expressions. It's very easy to use abstraction on top of reflection.emit and it does some simple optimizations too.
> 
> Marek
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list



More information about the Mono-devel-list mailing list