C method swizzling performance
What performance penalties arise while using method swizzling in Objective-C?
Which, if any, compiler optimisations are defeated with message swizzling?
Swizzling makes the Objective-C runtime flush its method caches. If you do all your swizzling as early as possible in your program, this will probably have no noticeable impact.
The compiler can't do much to optimize method calls because Objective-C allows any method to be overridden, even at run time (as with swizzling). So you've already paid the performance price of swizzling whether you use it or not.
链接地址: http://www.djcxy.com/p/27592.html上一篇: FXML中的JavaScript脚本
下一篇: C方法表现出令人惊叹的表现