3 ms·
>According to the link you posted, that's over four times slower than C++ virtual method dispatch Hmm, check the results in the same page for the 64bit Cocoa r
by foljs 16y ago
>According to the link you posted, that's over four times slower than C++ virtual method dispatch
Hmm, check the results in the same page for the 64bit Cocoa runtime. This is where most optimizations are made, because Apple used the 32->64 bit transition as an opportunity to do most binary compatibility breaking changes to the language.
There, in 64bit, the IMP cached msg send is actually FASTER than C++ virtual method dispatch.
And if your app's performance suffers because of method calls / msg sends, you are doing it wrong. They should be an insignificant amount of time compared to the actual processing stuff done by your app.