Inside

Rosetta 2

Rosetta 2

Last updated: 1 month ago

Rosetta wasn't the ideal solution during Apple's hardware transition in 2006, but it was a decent temporary fix to run PowerPC-based apps on Macs with Intel CPUs. Now, Rosetta 2 arrives in macOS Big Sur promising faster performance and better support on Apple Silicon.

● Brings current Intel-based Mac apps to Apple Silicon
● Faster than Rosetta
● Translates at install, not during execution
● Translates on-the-fly as needed
● Available in macOS Big Sur
● supports Universal 2 file format

One big issue when it comes to a significant hardware transition is app support. Those developed to run on a specific processor won't run on another without recoding and recompiling. Apple solves this problem with Rosetta 2 in macOS Big Sur.

What is Rosetta 2

Tim Cook explains Apple's transition from Intel-based Macs Tim Cook explains Apple's transition from Intel-based Macs

This is a behind-the-scenes feature in macOS Big Sur as part of Apple's shift away from Intel-based Mac designs. It's used to translate "currently shipping" Mac apps so they can run on upcoming Apple Silicon Macs without having to modify the source code.

More specifically, it translates x86_64 processor instructions (aka 64-bit Intel) for ARM-based Apple Silicon. It's not meant to substitute native apps, but instead, give developers time to create a "universal binary" for apps already offered on Mac.

Rosetta 2 works with Intel-based apps distributed through the Mac App Store, and desktop applications (programs) downloaded and installed from external sources.

How Rosetta 2 works

Maya for Mac using Rosetta 2 Maya for Mac using Rosetta 2

The big difference with Rosetta 2 compared to the original version is that it automatically translates non-native apps when they're installed, not during runtime. This increases the non-native app's overall performance because there's no additional processing overhead. However, it does translate code on the fly as needed, like just-in-time (JIT) JavaScript compilers for web browsers.

Previously during the PowerPC transition, when the user launched an app, the operating system kernel (core) looked to see if the app had a native binary. If not, the kernel executed the binary using Rosetta. Both Rosetta and the app ran in the same processing thread, allowing the former to quickly translate a block of application code and execute that specific block. This method is referred to as just-in-time (JIT) compilation.

Apple's documentation states that when Rosetta encountered a call to a routine that it had not yet translated, it translated the needed routine and continued the execution. This process ensured "smooth and continual transitioning between translation and execution." Rosetta also optimized the translated code to provide a near-native experience on non-native hardware.

If the developer chose to compile an app using the Universal binary format, users had the option to run the non-native executable using Rosetta. This allowed them to use older PowerPC-based plugins that did not natively support Intel's CPU architecture.

Rosetta 2 in macOS Big Sur will supposedly support "the most complex Pro apps and their plugins."

The Apple Silicon transition

Apple Silicon for Mac will be based on the arm64 architecture Apple Silicon for Mac will be based on the arm64 architecture

Apple made a major hardware transition in 2006 when it switched from PowerPC processors to Intel. This is notable because Apple didn't merely swap out CPUs and move on. PowerPC and Intel use two different processor designs, or rather, they carry out processing instructions differently. 

At the time, that meant Mac owners couldn't run software designed for a PowerPC machine natively on an Intel-based PC (aka x86) without real-time translation or rewriting the code to "speak" a different, new Intel-based language. Both methods had their advantages and disadvantages.

Apple currently faces the same issue with its transition away from Intel processors to those based on ARM's CPU architecture. Unlike the first transition where Apple redesigned Macs around Intel's chips, Apple will create in-house processors using a base design it licenses from Arm Holdings. The latter company doesn't fabricate chips — it designs the core technology and licenses it out so CPU makers can include unique features.

Apple uses ARM's designs in all in-house processors installed on the iPhone, iPad, iPod Touch, Apple TV, Apple Watch, and the HomePod. These are mostly mobile devices, and ARM hasn't gained a strong foothold in a PC market currently saturated by AMD and Intel. ARM-based PCs are notably slower than their AMD and Intel-based counterparts. How Apple Silicon Macs using in-house ARM-based chips will compare to Intel-based models remains to be seen.

Even more, running the current Mac app portfolio on the upcoming non-Intel devices could pose a problem on a performance level.

Going Universal

Apple's new Universal 2 file format Apple's new Universal 2 file format

One way to offer apps for two separate CPU designs is to compile an app with multiple executables inside using the Universal binary format. For instance, the app could contain executables for 32-bit and 64-bit Intel processors. The app's header includes information on the executables, so the parent operating system knows which one to run.

Apple enforced this method during its transition from PowerPC to Intel chips so that new apps  — not current ones — worked natively on both designs. Apps based on the Universal file format are larger than those compiled for one specific CPU architecture. The new format for combining x86_64 and arm64 executables is called Universal 2.

These two formats don't resolve the issue of running already published apps on a Mac with a completely different CPU design. For instance, an app designed for Macs with Intel processors can't natively run on macOS modified for an ARM-based chip. Something behind the scenes must "translate" the app. Enter cross-platform virtualization.

This technology "translates" binaries designed for one CPU architecture so they can run on a different operating system or processor. It remaps all operating system calls given the code differences between macOS for one processor design and macOS for another. The technology behind Rosetta 2, QuickTransit, developed by Transitive Corporation, uses this method.

Apple's Developer Transition Kit

Apple's hardware kit for bringing Intel-based apps to Apple Silicon Apple's hardware kit for bringing Intel-based apps to Apple Silicon

The DTK is part of Apple's Universal App Quick Start Program for developers to bring their current apps to Apple Silicon Macs and macOS Big Sur. This program includes beta versions of Xcode and macOS, access to developer labs and hardware forums, dedicated technical support, resources, and a hardware kit — the DTK — to test their apps in real-time. It's a Mac mini with these specifications:

  • Processor: A12Z Bionic
  • Memory: 16GB
  • Storage: 512GB SSD
  • I/O: 2x USB-C (10Gbps), 2x USB-A (5Gbps), 1x HDMI 2.0
  • Connectivity: WiFi 5, Bluetooth 5.0, Ethernet (1gb)

Enrolling into Apple's Universal App Quick Start Program costs a non-refundable $500. The program ends one year after the developer accepts Apple's terms and pays the fee. The DTK must be returned within 30 days after the program expires or is terminated.

Early benchmarks surfaced, showing a possible drop in performance in apps using Rosetta 2. Based on the non-native Geekbench 4, Apple's A12Z Bionic chip in the DTK managed an average 828 in the single-core test and an average 2,931 in the multi-core test. Benchmarks only list the four "big" cores underclocked at 2.4GHz, meaning the translated app may not identify the hardware correctly.

By comparison, the A12Z Bionic chip in Apple's latest iPad Pro scores an average 1,123 in the single-core test and an average 4,701 in the multi-core test. Here Geekbench runs natively on ARM-based hardware, requiring no translation. The app also lists all eight cores.

Rosetta

Rosetta launched with Mac OS X Rosetta launched with Mac OS X

Rosetta was initially designed to translate "currently shipping" apps built for Mac OS X that ran on PowerPC's G3 and G4 processors. It did not support apps built for older operating systems, like Mac OS 9, Mac OS 8, and so on. It also did not support apps built for PowerPC's G5 processor, although developers could modify G5-specific app code so they could run on Intel-based Macs using Rosetta.

The first version arrived in 2006 in Mac OS X 10.4.4 "Tiger" that was installed on the first Mac with an Intel processor. Rosetta was not included in Mac OS X 10.6 "Snow Leopard" but could be manually downloaded and installed. It was not included or offered in Mac OS X 10.7 "Lion" and newer.

According to Apple, at the time, apps that required "intense computing needs" weren't compatible with Rosetta, such as apps that dealt with 3D modeling and ray tracing. Word processors and apps that required "a moderate amount of user interaction" and had "high computational needs" or used OpenGL were mostly compatible.

In August 2006, benchmarks showed that Mac apps optimized for the PowerMac G5 ran slower than an Intel-based Mac Pro using Rosetta. Native app performance was up to two times better than running the same app through Rosetta, depending on the compared machines. Rosetta was meant to be a temporary "fix" while developers worked on Universal binaries that ran natively on both CPU architectures.

For example, Photoshop CS2 ran poorly on Intel-based Macs via Rosetta. Adobe resolved the issue by shipping Photoshop CS3 in a Universal binary format, providing separate, native binaries for PowerPC and Intel chips.

Craig Federighi talks about Rosetta 2 Craig Federighi talks about Rosetta 2

Overall, Apple's SVP of Software Engineering Craig Federighi boasted during WWDC in 2020 that Rosetta 2 will be even faster, more powerful, and more compatible than the original version for PowerPC. Heavy applications like Maya and games like "Shadow of the Tomb Raider" will supposedly not experience a performance hit running on Apple Silicon Macs using Rosetta 2.

 
 

Rosetta 2 Related Stories