After my post comparing different dynamic proxy frameworks, many people were surprised by the poor performance of LinFu.DynamicProxy framework. In the update I noted that it was gathering the stack trace for each intercepted call, that made the framework so slow.
Philip, the author of LinFu updated the framework, removing usage of StackTrace. It made a drastic change in the performance, and my previous comparison no longer correspond to current characteristics of the framework.
As such I decided to re-run the test. Here are the results:
All the times are roughly 10% better than the last time, which is due to interference from other processes on my machine. What is important is the relative values between frameworks. As we can see LinFu is now a lot faster – the change yielded over x20 performance improvement, making it almost as fast as spring, and twice as fast as Unity.
I still didn’t invoke proxied method. With LinFu currently the only way I’m aware of is doing it via MethodInfo.Invoke, which is relatively slow, but judging from Philip’s tweets, it will be addressed soon as well.