News for hackers. Stuff that matters.
Re:App Developers on Swift Evolution by pcwalton on Wednesday December 23, 2015 @11:07AM (#10783917)
According to that chart, Obj-C method calls are either 4.5x or 7.8x slower than C++ virtual method calls, depending on whether you're looking at 32- or 64-bit code. That alone is pretty bad.

But it's even worse than that: I'm talking about devirtualized calls, which are far faster than virtual calls in C++. More importantly than just the call time, devirtualization can have outsized performance impact because it enables inlining, converting intraprocedural optimizations to interprocedural optimizations. The difference between inlining and not can easily be a 10x-level performance difference with an optimizing compiler like LLVM.

Re:App Developers on Swift Evolution by mpweiher on Wednesday December 23, 2015 @06:25PM (#10786271)
The chart is wrong for message sends. I've been measuring this for a long time, and get ~2.1ns for a message send vs. 1.2ns for a cached message send on a comparable machine.

If you want inlining, use a static inline function.