Hacker News new | ask | show | jobs
by mcintyre1994 4664 days ago
I'll bite. Explaining to a "geek with low reading comprehension", what is the actual benefit to the iPhone being 64-bit?
2 comments

There are a lot of interesting things you can do with a massive address space even if you don't have the RAM to back it. You can mmap massive files. False pointers are virtually nonexistent for conservative GCs in a 64-bit environment (I believe modern Objective-C is compiler supported refcounting though so this doesn't really apply here). You can virtual alloc a 4GB array and just let it grow in physical memory on demand.

There is also a new instruction set to go along with the bump to 64-bits which improves things. However, I remember Herb Sutter saying that, in the case of x64, Microsoft generally found that the improved instruction set performance gains were a wash due to the increased cache misses caused by the doubling of the pointer width. I'm not sure how much ARM 64-bit instruction set improves things.

I'm definitely out of my depth here, I guess I just wasn't really convinced 32-bit was ever a ceiling on the iPhone. I'm sure Apple have their reasons though, and maybe massive files and 4GB arrays and really do matter to iPhone users more than I thought. I'm sure Apple have some reason beyond marketing, since I doubt the general consumer really cares.
> (I believe modern Objective-C is compiler supported refcounting though so this doesn't really apply here)

Yeah, I don't think they ever supported GC in iOS. Now that you mention it, it's probably not a coincidence that it was added to the Mac shortly after the entire product line had switched to 64-bit. You could still do it in 32-bit, but I doubt they were expecting many developers to start writing new 32-bit apps at that point.

What does use a conservative garbage collector on iOS, however, is Safari's JS engine. But I assume that the conservative scan is only used on the stack (that's what FF does), since it would be kind of silly to do a conservative scan of the heap for a language that doesn't support pointers. So it doesn't seem likely under normal circumstances that you'd have many false hits even with 32-bits.

Memory bus bandwidth - moving large chunks of data around just got twice as fast. That means loading textures for games, or hauling photos up from flash memory will be substantially faster now.
Memory bus bandwidth has nothing whatsoever to do with CPU word size. You'll have to wait for LPDDR4 for an increase in memory bandwidth.
There's no mandatory relationship between word size and memory bus size. 128-bit memory busses were common well before 64-bit CPUs were.