Debate Of The Decade: Will Apple Make The Shift From x86 To ARM64? A String Of Software Pearls Builds For A Strong Yes But An Absence Of Micro-architectural Expertise Casts A Strong Shadow

Earlier this month, Bloomberg re-iterated claims that have surfaced for years. The publication put a name to Apple’s alleged efforts, dubbing them as ‘Project Kalamata’. Mark Gurman claimed to have information from ‘sources close to the matter’ on what is the biggest transition for Apple under CEO Tim Cook’s leadership. Project Kalamata looked for a transition to ARM-based microprocessors for Macs by 2020 – a highly optimistic time frame to say the least.

While Mark claims that the transition will be phased, the report sent unnecessary shockwaves through the tech world and the stock market. Intel, whose processors Apple will replace with its in-house licensed solutions, saw stock prices go down with shares plunging by 9% as investors reacted irrationally.

android-p-5Related Forget The Notch Support, Android P Might Also Features The iPhone X Gestures – Screenshot

Soon after, the tech media began to analyze the potential impacts of this transition. At one end, Barclays reckoned with the potential financial impacts on the chip maker’s balance sheets. Citing market data, the bank argued that Apple’s Mac sales make up for 4% of Intel’s revenue. At the other, we need to consider the technical implications for such a change, and how they will impact Apple’s long-term strategic concerns. Today, we try to do just that so head on below.

And if you’re averse to reading long posts, there’s got a nice little summary at the bottom.

 Apple’s Switch To ARM-Based Macs: The Pros, Cons, Problems, Benefits, And More; Will Cupertino’s Biggest Transition Under Tim Cook’s Leadership Pan Out For Company And Its Users?

Rumors of Apple’s plans to use ARM-based processors for the Mac aren’t new. While this year’s speculation for Project Kalamata has injected fresh air in this speculation, claims of Apple experimenting with ARM-based Macs have been around for nearly four years. It was in 2014 when French publication MacBidouille reported that Apple has developed ‘OS XI’, an OS X equivalent running completely on ARM-based hardware.

screen-shot-2017-07-11-at-10-28-54-pmRelated Apple Watch Series 2 With Swollen Batteries Receive 3-Year Repair Program From Apple

Furthermore, this project covered several tiers of machines. These include,

  • iMacs with 4-8 quad-core ARM 64 processors.
  • Mac minis with up to 4 core ARM 64 processors.
  • A 13″ notebook with similar processor configurations.

At the time, Apple was leading with the iPhone, so there was little media attention towards the matter. Now that Cupertino’s looking to diversify revenue streams, this little tidbit is highly relevant; particularly after Bloomberg’s report on Project Kalamata.

If Apple was successfully running an OS X variant on ARM processors, then Mark Gurman’s claim of market-ready products by 2019 does not seem that far off. Apple is known for its secretive environment and given the iPhone’s popularity, media attention rarely focuses on Macs with the same intensity as it does on the smartphone.

In addition, looking at Apple’s history the possibility that it’s got the project under development for some time cannot be discounted. To back up our claim, we’ll take a reference from the past. In Jobs’ words, at Apple’s 2005 WWWDC, “Mac OS X has been leading a secret double life for the past five years.”

Now, for most folks unfamiliar with Apple’s operations, the rumored shift to ARM-based processors sounds too big to manage. But, Apple doesn’t operate like any other major company.Cupertino’s got a dedicated university designed to learn from past moves. Why bring this up? Because if MacBidouille’s report is correct, then Apple will also have followed its own footsteps the last time it migrated across microprocessor architectures. These as highlighted by Jobs, for the OS X were:

  1. Designs must be processor independent.
  2. Projects must be built for both Power PC and Intel processors.

Finally, before this sounds too much of a history lesson, Apple made the PowerPC-to-Intel transition ahead of Jobs’ stated schedule. Universal binaries (generated via Xcode 2.1) and Rosetta (running existing PPC binaries on Intel’s processors in real-time) helped, and the transition was as smooth as you’d expect. These led to a complete transition in six months, rather than two years as initially promised.

The Crux:

  1. Apple secretly developed Mac OS X on Intel processors for five years.
  2. It then announced Xcode 2.1 with fat binaries and Rosetta for emulation.
  3. It’s been six years since the first rumors of ARM-powered Macs came to light; Gurman believes that a market-ready product will launch in 2019.

All good? Okay, let’s move on to Intel’s x86 and how it works for Apple.

 Intel’s x86 ISA And Its Similarities/Differences With ARM v8 – Is A Complete Transfer For Mac OS Possible?

This is where things get interesting, and where Apple stands to face a big problem should it decide to abandon x86. While several folks like to compare the rumored ARM transition to Apple’s previous switch from PPC, in terms of architecture, the scenarios are 180 degrees apart. One big reason offered by Jobs in 2005 was that Intel’s PPW (Performance per Watt) was nearly five times of what PowerPC offered (70 vs 15).

Were Tim Cook to make a similar argument for a shift from CISC to RISC, he’d make a lot of sense too. This time, it’s ARM’s designs which offer Apple greater power efficiency when compared to Intel’s processors. Apple’s iPad is able to give users 24 hours of battery life; compare this with the MacBook Air and the difference is obvious.

Apple’s latest An processor, the A11 has a TDP (Thermal Design Power) of 5W without active cooling. Intel’s Core i5-7360U, on the other hand, has a TDP of 28W with active cooling. Ignoring microarchitecture, x86 and ARMv8-A have similarities and differences. Both allow conditional branching, 3 maximum operands and support eight octects (64bit).

Their differences, however, widen the gap far more than the similarities bridge. x86 allows operations to be performed on both memory and registers, resulting in operands being present in both. In contrast, v8-A and other RISC based architectures require that all operands and instructions are present in registers only. While limited to a paragraph, it’s this difference which lies at the heart of major performance differences between Intel’s x86 and ARM’s v8 designs.

If you think we’re done yet, you’re wrong. Comparing ARM and Intel’s processor offerings is tricky business; with the journey only starting at ISAs. See, while most folks love to compare instruction sets, a growing amount of research suggests that they become irrelevant as a standalone comparable for processor horsepower; one of the major problems Apple will face when deciding to switch from Intel to designing its own silicon.

Apple’s forte, when we analyze its current processors is always power management. While other ARM vendors focus on clock speeds for marketing, Apple chooses wider pipelines. Issue width for the A9 is 6 µ-ops, which is twice when compared against Qualcomm’s Krait and other designs from the same generation as Apple’s first 64-bit microarchitecture, Cyclone. Courtesy of Apple’s stinginess when it comes to microarchitecture, we can’t go too deep into a comparison with Intel at the moment.

To reach a much-needed conclusion, there is simply no proper architectural comparison between Apple’s Ax architecture and Intel’s desktop-class, performance heavyweights. Both are designed with vastly different applications. While there is a critical path dependant on single thread computations for nearly every application, a complete transition to ARM will require improved multi-thread and multi-core performance. And Cupertino’s only been able to nail this down with the A11, which is a small step.

The only feasible scenario at the moment is Apple utilizing the low TDP of single chips and clumping them together to gain serious PPW gains over Intel. Cupertino also leads over other Android vendors at integrating back+front end performance (via larger re-order buffers). The cards are stacked in its favor for microarchitectural expertise.

Given the slowdown of Moore’s Law, GPUs will also play a more important role in tackling complex computations in the future. This could provide Apple with a window to build customized environments that pack a good performance punch and live up to efficiency requirements that justify their existence.

Finally, Apple should also have a good idea of how to integrate inter-generational performance trade-offs after years of successfully designing processors for the iPhone.

The Essence:

  1. ISA differences matter significantly, making for a similar PPW environment as was in 2005 when Apple switched over to Intel.
  2. Apple’s microarchitecture on the An processors is beyond what’s required on mobile devices.
  3. However, navigating multi-threaded and performance-intensive applications via microarchitecture will prove as one of the biggest hurdles for Cupertino.

(mac)OS X, Emulators, Marzipan And Dual Platform Compatibility; Has Apple Secretly Prepared macOS For Portability To ARM?

Another major hurdle which waits for Apple is software compatibility. However, if we’re correct with our conclusions, this will prove a lot easier to overcome when compared to microarchitecture gains and redesign. Interestingly, Apple is also working on creating cross-platform frameworks which aim towards bridging the gap between Appkit and UIkit. The former is Apple’s framework for creating macOS apps; the latter is for the iOS ecosystem.

The gap between iOS and macOS further widened as Apple began to focus more towards the former. Now, developers find it more profitable to write apps for iOS, and Apple’s 30% cut on the Mac App Store doesn’t encourage anyone either. To fix this, a cross-platform framework dubbed as Marzipan is rumored to launch at this year’s WWDC.

Marzipan will provide developers a new asset library with the complete ability to reformat this code for the two different platforms; a godsend as poor app transfer from iOS to macOS causes a lot of frustration. While all this paints a bright-ish picture for OS X and the Mac app store, it isn’t directly relevant to our discussion.

But, it paints a good picture on Apple’s efforts to lessen the gap between OS X and iOS; or between Appkit and UIkit, which are ‘stock’ elements for developers to use with Swift, Objective-C or others.

Apple’s journey into its current programming environment starts with NeXTSTEP. Introduced by Steve Jobs on his return to Apple in the late 90s, NeXTSTEP would formally introduce Objective-C for Apple’s software development forum, choosing it over the original Smalltalk model developed at Xerox PARC. It gave the company a significant leg-up as its hardware could now run software that had been previously developed using C, solving two problems at the same time.

Jumping straight into the details, both macOS and iOS use XNU as their Kernel, bridging an important gap for the former’s compatibility with ARM64. For the uninitiated, a kernel is what works underneath your operating system, making user that system critical processes work without failure. Think of it as the operating system for your operating system. What this means is that most apps for everyday use will have to be recompiled, not written from the ground up.

Finally, take it on our word if you must, but we have good reason to believe Apple has already shifted macOS to ARM internally-  and it has done so years back, without the end goal of designing iOS. Developers are required to submit apps in LLVM Bytecodes and not as architecture specific code. This even removes the requirement for recompilation, as new code can simply be generated to target the architecture in question.

The Gist:

  1. Apple’s rumored Marzipan cross-platform framework will work wonders for macOS, hypothetically.
  2. Darwin’s XNU (X is Not Unixhybrid kernel removes significant barriers towards porting macOS apps from x86 to ARM64.
  3. Apple’s code submission requirements further bridge this gap and so does macOS Sierra’s support for ARM’s Hurricane.

Putting It Together – Can/Should We Really Expect A Complete Shift To ARM?

To sum all of this up, there are three broad aspects to consider when analyzing a potential shift for macOS from x86 to ARM64. As promised at the beginning of this post, we’ll do a summary and take a look at them category wise.

1) The Hardware:

Architecturally speaking, Intel’s processors are designed to perform complex, multi-threaded operations at the expense of power consumption. While this was good when Moore’s Law wasn’t slowing down, now it’s a different picture. Should Apple dare to make a complete shift that involves high-end MacBooks and iMacs, it will have to design its silicon from the ground up.

While the company made important gains with the A11, its current processor microarchitecture is insufficient simply because it isn’t designed to match high-end Intel processors. Designing chips is a complex process, which involves complete knowledge of present limitations with the hope that future launches will remove them.

As such, this is the greatest hurdle for the company to overcome. However, were Apple to start experimenting with low or medium powered products, it can deliver customized solutions where the GPU takes on a greater role and then learn from the experience. ISA will play an important role here, particularly since a lot of different applications have entrenched needs.  Finally, efficiency gains from ARM will provide a strong incentive for Cupertino to test the waters.

Image courtesy: Knowledge Stack

2) The Software:

Navigating this terrain will prove easier than hardware. Apple’s XNU Kernel for macOS is compatible with x86 and ARM64, which removes the need for complete code rewriting. Speaking in broad terms, this removes the need for large-scale tinkering with macOS’ base i.e. the kernel.

With its rumored Marzipan cross-platform framework, the company is already looking to make the gap between iOS and macOS smaller. While not directly relevant to our discussion, it goes to show current sentiment behind closed doors. macOS Sierra includes support for ARM’s Hurricane architecture, hinting at the existence of a sentiment for change at Apple.

Finally, Cupertino’s requirement for app submission in the form of LLVM Bytecodes further eases out the path for a future transition. This removes the need for recompilation and allows new code to be generated simply to target the architecture in question.

3) The Business:

The last time Apple made such a move, its operating environment was significantly different. After coming back from the dead, it needed to remain consistently competitive across multiple fronts. Power PC didn’t deliver, allowing neither feasible yields from IBM nor low thermal envelopes for notebooks. Intel also offered vastly superior PPW ratios. Therefore, Apple switched suppliers.

Another major reason which a lot of folks have already highlighted is that Intel’s independent development cycles cause delays for Apple. Combine this with how Cupertino is unable to optimize the silicon for its products and Apple’s built-in need to operate on its own terms, the motivation behind an x86 to ARM64 switch grows even stronger. Events such as Apple being dragged into Intel’s dispute with Nvidia on the Core2Duo further fan the flames.

Finally, if Apple were to use its own hardware, the MacBook/Mac/iMac’s bill of materials would go down significantly. Processors and motherboards make up for an important chunk of the costs, without the independence to customize them or have them available on its own schedule. Subsequently, a lot of serious problems will resolve in personal computing for the company if it can successfully navigate the minefield which awaits.

However, the last time Apple made such a shift, it needs to consider several additional factors. In 2005 Mac sales were growing and the company could ride on its recent goodwill following the iPod’s success. Intel was also the higher powered alternative and Moore’s law was in full swing. Right now, Mac sales are stagnant, the iPhone isn’t what it used to be and Apple needs to regain its innovational streak, if it can.

One thing that is certain is that it’s a big risk. Should Apple decide in favor, we’d all better hope it succeeds.