Is it possible to force the compilation of DynamicMethod

  • Thread starter Thread starter HexJacranda
  • Start date Start date
H

HexJacranda

Guest
I'm working on a Json serialization solution. I found out that the serialization based on emitting was much faster than direct operations on Reflection api where the emitted code had already been run once(each time with different data). Obviously the problem is JIT. So I wonder wether there is a way to force the compilation of DynamicMethod. The PreJIT feature,provided by Runtime.CompilerServices.RuntimeHelper.PrepareMethod, simply doesn‘t work because we have no access to RuntimeMethodHandle of DynamicMethod. So is there other way to achieve this goal?

Thanks in advance.

Continue reading...
 
Back
Top