Change IL Emit invoke path to use function pointers and OpCodes.Calli #75357
Labels
area-System.Reflection
Cost:S
Work that requires one engineer up to 1 week
tenet-performance
Performance related issue
Milestone
Currently, the invoke fast-path generates IL using either
call
orcallvirt
. If this is changed to usecalli
and function pointers, it is possible to cache the generated dynamic method and use it for all such calls to the same signature. This reduces the memory footprint and makes calling subsequent but different methods faster since there would essentially be a hashtable look upon the signature instead of generating a new method.In addition, it will be used to support invoke against a function pointer via #75347.
Items to consider:
ldvirtftn
).The text was updated successfully, but these errors were encountered: