Is Apple’s A7 chip twice as fast at processing and graphics, as Apple promised when announcing the new iPhone 5S? At least for Ben Weiss, the answer is yes — but his app is unusually well suited to take advantage of the new processor’s features.
The app in question is Iter9’s new Frax app for generating lavishly detailed fractal imagery by running mathematics calculations on both the CPU and GPU. It gets a major speed boost on theiPhone 5S, Weiss said, evident in faster rendering times for the swirling psychedelic images laboriously calculated one pixel at a time.
Frax is currently a 32-bit app, Weiss said, and it runs 50 percent faster on the A7-powered iPhone 5S compared with the A6-powered iPhone 5. And then came the second speed boost: When he compiled the first 64-bit version, Frax ran 25 percent faster than the 32-bit version on the iPhone 5S. Together, that means the 64-bit app runs nearly 90 percent faster on an iPhone 5S than the 32-bit version on the iPhone 5.
“We’ll have this ready in a dot release soon,” so iPhone 5S customers can take advantage of the 64-bit version, Weiss told CNET. And he expects further performance gains from software optimization.
Other developers probably shouldn’t expect the same speedup, though. Calculating fractal imagery, while taxing for a processor, also happens to be the sort of work that it can do very predictably and efficiently without a lot of the fits and starts common in mainstream software, said David Kanter, principal analyst at Real World Tech.
“Fractalization is the nicest kind of workload,” Kanter said. “Whatever speedup they’re seeing is probably the best case.”
Apple wasn’t clear what speed tests it was using and how universal their results were whenannouncing the better A7 performance. But one thing is sure: Benchmarks are always an imperfect measure of real-world performance, even when there are no shenanigans involved.
(Credit: screenshot by Stephen Shankland/CNET)
Speed tests let people compare software performance on different hardware, operating systems, and configurations. But it’s hard to find benchmarks that directly predict how well the tremendous variety of real-world apps will do. Different software stresses different aspects of computing performance — memory access, graphics operations, running a single sequence of steps, running multiple sequences that can be spread across multiple processor cores, and so on.
64-bit boost? Nope
There are some points of clarity, though. One in Frax’s case is that the 64-bit nature of the A7 —temporarily derided as a gimmick by an executive at rival chipmaker Qualcomm — doesn’t actually help performance today. A prime reason for 64-bit chips is easy support for more than 4GB of memory, and iOS devices aren’t yet at that limit, but the 64-bit design brings plenty of other improvements that do help performance.
The Frax boost instead comes chiefly from two changes, Weiss said: the A7’s larger number of storage slots, called registers, and the fact that it can perform high-precision calculations faster on numbers stored in floating-point formats. In his words:
There are two main reasons the 64-bit version tends to be much faster. First is that the number of hardware registers on the CPU is doubled, from 16 to 32. Frax has some fairly complicated inner loops that keep track of more than 16 numbers at a time, which means that some values are constantly shuffled back and forth between registers and memory to make room. But with 32 registers, there’s plenty of space for all the numbers we need, so the code runs much more efficiently.
The second reason is that the 64-bit chip can perform two double-precision operations in parallel, whereas previous chips could only perform one at a time. This needs to be specially coded for, but in theory it can result in a doubling of speed…
The instructions to do two double-precision operations at once with SIMD [single instruction, multiple data] were added as part of the overall 64-bit design changes, though it’s not related to the 64-bitness of the chip per se.
He also said the ARMv8 chip architecture that the A7 uses gives Frax a boost because it can perform a combination of multiplication and addition in one step instead of two.
Real World Tech’s Kanter points to other advantages that come with the A7 that will help a wider variety of software: better performance when it’s time for the chip to retrieve data from a device’s main memory or its high-speed cache memory. Specifically, the chip can retrieve data sooner from its level-2 cache — the first place a processor looks for data — which means the less time a chip wastes idling.
“There were some really big improvements in the A7 totally unrelated to the processor core,” Kanter said. “In particular their caches got way, way, way faster. The memory bandwidth is about two times faster, and the L2 cache is about half the latency it was before.”