JS Ext

Monday, September 16, 2013

64bit iPhone: Innovation or Buzz

Over ten years ago, I was in a Gamestop with a buddy of mine.  We were in the PC gaming section (you know, when Gamestop still had a PC section) talking about some of the new PC games coming out.  Someone we didn't know came over wanting to talk to us.  He then changed the subject asking what we thought about 64bit CPUs and whether they would take off.  My buddy (who reads this blog so he might comment) decided to troll him and say "Sun has been using 64bit for years".  The guy had this weird confused look on his face.  I laughed but felt bad for the guy.

Just like servers then desktops after them, all phones will run a 64bit CPU.  The question is when.  Apple has decided now, but is that just for show or do they have something in store for us?  ARMv8 is still really know and was designed for ARM to break into the server market, so is this the right move for Apple?

First of all, there is a performance benefit for using 64bit.  The benefits can be lumped into two categories: math and memory throughput.  Lets break math down into two more sub-categories.  First, there is the 64bit arithmetic.  Very few programs need to do 64bit arithmetic.  64bit arithmetic is so slow on 32bit CPUs, that programs generally don't do it unless they absolutely have to.  These programs can expect a performance boost by running on a 64bit CPU.  3D games generally fall into this category.  2D games do not, however.

The second sub-category is when you are running the same arithmetic over a set of data.  The 64bit arithmetic in theory would allow you do double the performance of 32bit arithmetic by treating two 32bit add operations as a single 64bit add operation.  32bit ARM processors generally already have support for 64bit and 128bit SIMD operations.  So, you generally won't see that much of an improvement there.

The other performance benefit is in memory operations.  When using registers to copy memory, you generally copy one "word" at a time.  in a 32bit CPU, this means you copy 4 bytes of data for every copy operation.  When moving semi-large amounts of data, like 4kb, you are using a lot of cycles.  You can cut the cycle time in half when your word size doubles to 64bits.  The most common use case for this is image copy operations, sometimes referred to as a Blit.  The general interface could see a speedup due to this.

Like most performance gains, there is a memory trade off.  Pointers are generally represented using a word size.  So, doubling the word size to 64bits means doubling the amount of memory a process uses for pointers.  This can amount to a much larger memory footprint for an application.  This is really bad for low memory devices like mobile phones.

This issue segways us into the end of the real benefits of 64bit and into the marketing hype.  If you listen to the hype, then having a larger memory footprint might not be a big deal since 64bit word sizes allow you to have more memory!  Although that is true, it is also pretty irrelevant in this case.  Although it is true that 32bit word sizes limit the addressable memory, they limit it to 4GB.  That is 4 times the RAM size of the iPhone 5.  Obviously being 32bit is NOT a limiting factory.  Therefore, the extra addressable memory advantage is hype and doesn't help with the very real probably of your apps now having a larger memory footprint.  In fact, Unix can play games with addressable memory to make the whole upgrade to 64bit unnecessary (for now).

Here is where the true power of upgrading to 64bit sits.  I'm actually disappointed in Apple's marketing because I feel like they missed an opportunity here.  I guess when your customer base always buys the latest version, marketing the longevity of a device is not as important as it obviously is to the Apple engineers.  So far, Apple hasn't said a lot about the possibility of releasing apps that work in both iOS and OSX.  The reason for this is easily explainable: the software technology isn't ready yet.  But here is the thing, software can be upgraded after the fact.  Just because the hardware team got there first doesn't mean you should postpone the whole project.  Apple's engineers are positioning themselves in a way that will revolutionize mobile devices.  I have talked about this idea before.  The merging of desktop/laptop/tablet and phone can be very big.  Although Apple isn't tackling it the way I would have handled it, at least they are tackling it.

In the end, 64bit is mostly hype for now, but by releasing 64bit now, Apple ensures that when they start making some major changes in how we view mobile devices, the iPhone 5s won't be left in the dust.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.