3 ms·
The compiler does some very fancy stuff with objc_msgSend to make it fast, and the selectors are interned. https://www.mikeash.com/pyblog/objc_msgsends-new-pro
by AJRF 6y ago
The compiler does some very fancy stuff with objc_msgSend to make it fast, and the selectors are interned.
https://www.mikeash.com/pyblog/objc_msgsends-new-prototype.html https://www.mikeash.com/pyblog/objc_msgsends-new-prototype.h...
- donarb 6y agoObjective-C had an IMP pointer, essentially a function pointer. If you needed to send a message to an object in a tight loop, you could extract the pointer before the loop and use it inside.