The A5 Architecture & CPU Performance

The original iPhone debuted with a single 412MHz ARM11 core built on a 90nm process. The 3G improved network performance in 2008 but left the SoC untouched. It wasn't until the iPhone 3GS in 2009 that the SoC got a major performance and power update. Apple moved to a 65nm process node, a brand new ARM Cortex A8 based SoC and an upgraded GPU. The A4 released in 2010 once again gave us a process shrink but kept the architecture unchanged.


Apple's A5 SoC

Apple's A5, first introduced with the iPad 2, keeps process technology the same while introducing a brand new CPU and GPU. The A5 integrates two ARM Cortex A9 cores onto a single die. The improvement over the A4 is tremendous. At the single core level, Apple shortened the integer pipeline without reducing clock speed. With a shorter pipeline the A5 gets more done per clock, and without decreasing clock speed the A5 inherently achieves better performance at the same clock. The move to the Cortex A9 also enables out-of-order instruction execution, further improving architectural efficiency. I've heard there's a 20% increase in performance per clock vs. the Cortex A8, but combine that with the fact that you get two A9s vs a single A8 in last year's design and you get a pretty big performance increase.

There are several situations where the A5's two cores deliver a tangible performance benefit over the A4's single core. Like Android, iOS appears to be pretty well threaded. Individual apps and tasks can take advantage of the second core without a recompile or version update. The most obvious example is web browsing.

Mobile Safari is well threaded. Javascript rendering can be parallelized as well as parts of the HTML parsing/rendering process. All of the major Javascript performance benchmarks show a 60 - 70% increase in performance over the A4, which is partially due to the availability of the second core:

SunSpider Javascript Benchmark 0.9.1 - Stock Browser

Rightware BrowserMark

This translates directly into faster page load times. As you can see in the video below, the iPhone 4S (left) loads the AnandTech front page over WiFi in about 5 seconds compared to 9 seconds on the iPhone 4 (right). That's really the best case scenario, the improvement in the next page load time was only about a second (7s vs 8s).

Typical improvements in load time fall in the 10 - 70% range, contributing significantly to the phone feeling snappier than its predecessor. To quantify the improvement I ran through our standard web page loading suite, a test that hits AnandTech, CNN, NYTimes, Engadget, Amazon, Digg and Reddit hosted locally on our lab's network. The average page load time over WiFi for all of the pages is below:

AnandTech Web Page Loading Performance Suite

While web page rendering is a natural fit for multiple cores, I was surprised by how poorly threaded some apps ended up being. For example, although I did see performance improvements in exporting edited videos from the iOS version of iMovie, the gains weren't always evident. A quick profile of the app revealed that much of the export process is still single threaded. Just as we've seen on the desktop, there will be some added work necessary to get all apps to utilize multiple cores on iOS.

It's not always performance within an app that saw improvement with the A5: application install and launch times are also much quicker on the 4S. The time to launch Epic's iOS Citadel demo went from 32 seconds on the iPhone 4 to 22 seconds on the 4S. While the iPhone 4 may feel fast enough for many users, the 4S is noticeably faster.

Photos App - Auto Enhance Image

Much of the faster feel comes from by shaving off of seconds here or there. For example, I noticed apps like Messages pop up just slightly quicker on the 4S and you'll see your listing of messages a hair faster than you would on the 4. In the video above you get a brief idea of the sort of subtle improvements I'm talking about. YouTube launches a fraction of a second quicker on the 4S vs the 4.

These subtle decreases in response time are simply icing on the cake. The move from a 4 to a 4S is one of those upgrades that you'll notice right off the bat but will really appreciate if you go back to an iPhone 4 and try to use it. If you do a lot of web browsing on your phone, you'll appreciate the 4S.

I wasn't entirely sure whether or not I could attribute all of these performance improvements to the faster CPU. It's possible that some of the tests I mentioned are IO bound and Apple could have used faster NAND in the 4S. To find out I rounded up a bunch of iPhone 4Ses at all available capacities and measured sequential write speed:

NAND Performance

Apple uses multiple sources for NAND so it's possible that you'll see these numbers move around a bit depending on your particular phone. It looks like the iPhone 4S' NAND is no faster than what Apple shipped last year - at least in sequential write speed. The target appears to be 20MB/s and Apple does its best to stay around there. My iPhone 4 is actually pretty quick at 22MB/s but the advantage isn't significant enough to make a huge deal about. I don't have a good way of measuring random IO performance yet but application launch time is largely governed by sequential IO so I don't expect we're seeing gains from anything outside of the CPU and memory bandwidth in the earlier tests.

Faster Throughput on WCDMA The Memory Interface
Comments Locked

199 Comments

View All Comments

  • metafor - Tuesday, November 1, 2011 - link

    When you say power efficiency, don't you mean perf/W?

    I agree that perf/W varies depending on the workload, exactly as you explained in the article. However, the perf/W is what makes the difference in terms of total energy used.

    It has nothing to do with race-to-sleep.

    That is to say, if CPU B takes longer to go to sleep but it had been better perf/W, it would take less power. In fact, I think this was what you demonstrated with your second example :)

    The total energy consumption is directly related to how power-efficient a CPU is. Whether it's a slow processor that runs for a long time or a fast processor that runs for a short amount of time; whichever one can process more instructions per second vs joules per second wins.

    Or, when you take seconds out of the equations, whichever can process more instructions/joule wins.

    Now, I assume you got this idea from one of Intel's people. The thing their marketing team usually forgets to mention is that when they say race-to-sleep is more power efficient, they're not talking about the processor, they're talking about the *system*.

    Take the example of a high-performance server. The DRAM array and storage can easily make up 40-50% of the total system power consumption.
    Let's then say we had two hypothetical CPU's with different efficiencies. CPU A being faster but less power efficient and CPU B being slower but more power efficient.

    The total power draw of DRAM and the rest of the system remains the same. And on top of that, the DRAM and storage can be shut down once the CPU is done with its processing job but must remain active (DRAM refreshed, storage controllers powered) while the CPU is active.

    In this scenario, even if CPU A draws more power processing the job compared to CPU B, the system with CPU B has to keep the DRAM and storage systems powered for longer. Thus, under the right circumstances, the system containing CPU A actually uses less overall power because it keeps those power-hungry subsystems active for a shorter amount of time.

    However, how well this scenario translates into a smartphone system, I can't say. I suspect not as well.
  • Anand Lal Shimpi - Tuesday, November 1, 2011 - link

    I believe we're talking about the same thing here :)

    The basic premise is that you're able to guarantee similar battery life, even if you double core count and move to a power hungry OoO architecture without a die shrink. If your performance gains allow your CPU/SoC to remain in an ultra low power idle state for longer during those workloads, the theoretically more power hungry architecture can come out equal or ahead in some cases.

    You are also right about platform power consumption as a whole coming into play. Although with the shift from LPDDR1 to LPDDR2, an increase in effective bandwidth and a number of other changes it's difficult to deal with them independently.

    Take care,
    Anand
  • metafor - Tuesday, November 1, 2011 - link

    "If your performance gains allow your CPU/SoC to remain in an ultra low power idle state for longer during those workloads, the theoretically more power hungry architecture can come out equal or ahead in some cases."

    Not exactly :) The OoOE architecture has to perform more tasks per joule. That is, it has to have better perf/W. If it had worse perf/W, it doesn't matter how much longer it remains idle compared to the slower processor. It will still use more net energy.

    It's total platform power that may see savings, despite a less power-efficient and more power-hungry CPU. That's why I suspect that this "race to sleep" situation won't translate to the smartphone system.

    The entire crux relies on the fact that although the CPU itself uses more power per task, it saves power by allowing the rest of the system to go to sleep faster.

    But smartphone subsystems aren't that power hungry, and CPU power consumption generally increases with the *square* of performance. (Generally, this wasn't the case of A8 -> A9 but you can bet it's the case to A9 -> A15).

    If the increase in CPU power per task is greater than the savings of having the rest of the system active for shorter amounts of time, it will still be a net loss in power efficiency.

    Put it another way. A9 may be a general power gain over A8, but don't expect A15 to be so compared to A9, no matter how fast it finishes a task :)
  • doobydoo - Tuesday, November 1, 2011 - link

    You are both correct, and you are also both wrong.

    Metafor is correct because any chip, given a set number of tasks to do over a fixed number of seconds, regardless of how much faster it can perform, will consume more energy than an equally power efficient but slower chip. In other words, being able to go to sleep quicker never means a chip becomes more power efficient than it was before. It actually becomes less.

    This is easily logically provable by splitting the energy into two sections. If 2 chips are both equally power efficient (as in they can both perform the same number of 'tasks' per W), if one is twice as fast, it will consume twice the energy during that time, but complete in half the time, so that element will ALWAYS be equal in both chips. However, the chip which finished sooner will then have to be idle for LONGER because it finished quicker, so the idle expense of energy will always be higher for the faster chip. This assumes, as I said, that the idle power draw of both chips being equal.

    Anand is correct, because if you DO have a more power efficient chip with a higher maximum wattage consumption, race to sleep is the OFTEN (assuming reasonable idle times) the reason it can actually use less power. Consider 2 chips, one which consumes 1.3 W per second (max) and can carry out '2' tasks per second. A second chip consumes 1 W per second (max), and can carry out '1' task per second (so is less power efficient). Now consider a world without race-to-sleep. To carry out '10' tasks over a 10 second period, Chip one would take 5 seconds, but would remain on full power for the full 10 seconds, thereby using 13W. Chip two would take 10 seconds, and would use a total of 10W over that period. Thus, the more power efficient chip actually proved less power efficient.

    Now if we factor in race-to-sleep, the first chip can use 1.3 for the first 5 seconds, then go down to 0.05 for the last 5. Consuming 6.75W. The second chip would still consume the same 10W.

    Conclusion:

    If the chip is not more power effficient, it can never consume less energy, with or without race-to-sleep. If the chip IS more power efficient, but doesn't have the sleep facility, it may not use less energy in all scenarios.

    In other words, for a higher powered chip to reduce energy in ALL situations, it needs to a) be more power efficient fundamentally, and b) it needs to be able to sleep (race-to-sleep).
  • djboxbaba - Monday, October 31, 2011 - link

    Well done on the review Brian and Anand, excellent job as always. I was resisting the urge to tweet you about the eta of the review, and of course I end up doing it the same day as your release the review :).
  • Mitch89 - Monday, October 31, 2011 - link

    "This same confidence continues with the 4S, which is in practice completely usable without a case, unlike the GSM/UMTS iPhone 4. "

    Everytime I read something like this, I can't help but compare it to my experience with iPhone 4 reception, which was never a problem. I'm on a very good network here in Australia (Telstra), and never did I have any issues with reception when using the phone naked. Calls in lifts? No problem. Way outside the suburbs and cities? Signal all the way.

    I never found the iPhone 4 to be any worse than other phones when I used it on a crappy network either.

    Worth noting, battery life is noticeably better on a strong network too...
  • wonderfield - Tuesday, November 1, 2011 - link

    Same here. It's certainly possible to "death grip" the GSM iPhone 4 to the point where it's rendered unusable, but this certainly isn't the typical use case. For Brian to make the (sideways) claim that the 4 is unusable without a case is fairly disingenuous. Certainly handedness has an impact here, but considering 70-90% of the world is right-handed, it's safe to assume that 70-90% of the world's population will have few to no issues with the iPhone 4, given it's being used in an area with ample wireless coverage.
  • doobydoo - Tuesday, November 1, 2011 - link

    I agree with both of these. I am in a major capital city which may make a difference, but no amount or technique of gripping my iPhone 4 ever caused dropped calls or stopped it working.

    Very much an over-stated issue in the press, I think
  • ados_cz - Tuesday, November 1, 2011 - link

    It was not over-stated at all and the argument that most people are right handed does not hold a ground. I live in a small town in Scotland and my usual signal strength is like 2-3 bars. If browsing on net on 3G without case and holding the iPhone 4 naturaly with left hand (using the right hand for touch commands ) I loose signal completely.
  • doobydoo - Tuesday, November 1, 2011 - link

    Well the majority of people don't lose signal.

    I have hundreds of friends who have iPhone 4's who've never had any issue with signal loss at all.

    The point is you DON'T have to be 'right handed' for them to work, I have left handed friends who also have no issues.

    You're the exception, rather than the rule - which is why the issue was overstated.

    For what it's worth, I don't believe you anyway.

Log in

Don't have an account? Sign up now