1

Closed

Try to accelerate computation using IL generation

description

Use Reflection.Emit API to construct a specific set of instructions for a given function such that future differentiations will be faster than with current Visitor based implementations
Closed Sep 26, 2012 at 2:34 PM by alexshtf
Closed because manually generating IL does not accelerate computation.

comments

alexshtf wrote Sep 26, 2012 at 2:34 PM

An experiment shows that custom IL generation actually works SLOWER both when using DynamicMethod or Expression.Compile.

Unless proven otherwise, it seems that manually generating IL does not accelerate the gradient computation but slows it down.

davidacoder wrote Sep 26, 2012 at 6:42 PM

Hm, interesting, and a bit surprising. I've worked quite a bit on dynamically generating code lately, if you want I could have a look at this as well, maybe you could send me the code of your experiment?