Skip to content

Latest commit

 

History

History
10 lines (6 loc) · 975 Bytes

AddTrampolineMethodOptionsTransformation.md

File metadata and controls

10 lines (6 loc) · 975 Bytes

AddTrampolineMethodOptionsTransformation

[Transformation Source]

Some native functions require a special helper method called a trampoline to make them easier to call from C#. This transformation applies the specified MethodImplOptions to all functions in the entire library. Typically it is used to enable aggressive inlining.

When this transformation is applicable

This transformation is entirely optional. Marking all functions with MethodImplOptions.AggressiveInlining may improve performance in libraries which require frequent use of functions via trampolines. (For example, all virtual methods require trampolines to perform the virtual method dispatch.)