4 ms·
It's cool to get a look at a piece of assembly code that seems oddly familiar from all those times when my app has crashed in objc_msgSend due to a prematurely
by pavlov 13y ago
It's cool to get a look at a piece of assembly code that seems oddly familiar from all those times when my app has crashed in objc_msgSend due to a prematurely released object... (I still write non-ARC code for compatibility reasons. Sigh.)
I find the following claim slightly misleading:
32-bit x86 was quickly overtaken by 64-bit, so this code received little attention after Tiger and many of those inefficiencies remain to this day.
There are still major 3rd party apps that run in 32-bit mode on the Mac. Google Chrome is probably the most popular.
- chrisdevereux 13y agoProbably a more accurate claim would be: The 32-bit x86 runtime was quickly overtaken by 64-bit. 32-bit apps will mostly be cross-platform C++ codebases, which, if they use Obj-C at all, will do so very minimally.
- mikeash 13y agoIt's perfectly correct from Apple's perspective (which is the perspective from which this article is written). Apple started shipping 64-bit Intel Macs less than a year after they started shipping Intel Macs at all. OS X 10.4 was the first version to support Intel, 10.5 was the first version to fully support 64-bit, and by 10.6 most of the system was running 64-bit. 10.7 dropped support for 32-bit Macs entirely. Apple had little reason to improve 32-bit since apps can simply target 64-bit if they want the speed improvement. From Apple's perspective, Chrome makes a deliberate choice to run in that environment and they have no particular reason to help them out.
- jamesaguilar 13y agoAnyway, since Chrome is mostly C++ code, especially in the inner loop, I doubt that a faster objc_msgSend would noticeably improve performance.
- chc 13y ago"X was quickly overtaken by Y" does not imply "X completely vanished." Yes, a few notable apps are still 32-bit. But if you look at all Mac OS X programs in existence, a very healthy majority preferentially target the 64-bit platform. The 32-bit apps are the odd ducks, no matter how big a couple of those ducks have grown.