News for hackers. Stuff that matters.
Re:App Developers on Swift Evolution by mpweiher on Wednesday December 23, 2015 @06:15PM (#10786232)
Actually, Objective-C message sending is extremely fast, only slightly slower than a C++ virtual method call and in the same ballpark as a function call (the relative cost has drifted from 40% to 2x higher depending on OS version and machine architecture) without much of an impact on applications.

In addition, message-sending is extremely cheap compared to other operations, for example roughly 50x faster than object allocation.

Last not least, in the few cases where messaging does become an issue, it is trivial to replace with more optimized dispatch, ranging from an IMP-cached send to a static inline function depending on the performance requirements and API boundaries in question.

There are no comments on this comment yet.