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

Jonathan Shore jonathan.shore at gmail.com
Tue Feb 14 16:27:53 UTC 2012


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.

Millions of rules are generated across time within the scope of one process / AppDomain.   During the computation of fitness each rule is evaluated millions of times, but once fitness is computed, the rule will never need to be evaluated again.   Computing fitness takes 10-20 seconds, so the cost of this in ratio to compilation is small.   Hence increasing the performance by 5x is desirable.

With the above in mind:

I assume I can remove a class created with the compiler as a service?
Would there be residual in the JIT or elsewhere that will accumulate, becoming a memory leak issue?
If I am running with llvm enabled, will the compiler as a service or reflection.emit make use of LLVM for JIT?
Should I prefer the Mono api or reflection.emit for performance or other reasons?

Thanks

Jonathan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20120214/774de3ed/attachment.html>


More information about the Mono-devel-list mailing list