Why is Calli Faster Than a Delegate Call?
Given your performance numbers, I assume you must be using the 2.0 framework, or something similar? The numbers are much better in 4.0, but the “Marshal.GetDelegate” version is still slower. The thing is that not all delegates are created equal. Delegates for managed code functions are essentially just a straight function call (on x86, that’s … Read more