![apple 2 emulator windows apple 2 emulator windows](https://he-1000-1975.com/wp-content/uploads/2018/03/Apple-IIe.jpg)
In tandem, Rosetta 2 is able to translate x86 instruction sets to ARM-specific code much before and in a faster way, bringing the performance difference between Universal native apps and Intel-based apps to a narrow margin. In cases where the parameters are not known or the values will be generated in the runtime, Rosetta 2 uses JIT for real-time translation. It makes the Intel-based app behave like a Universal app made natively for the Apple Silicon. Even before you have opened an app, Rosetta 2 uses the AOT compiler during the app installation to translate the code.
![apple 2 emulator windows apple 2 emulator windows](https://retroviator.files.wordpress.com/2020/08/img_6150.jpg)
What it means is that Rosetta 2 now uses both AOT and JIT compiler, depending on the scenario.
![apple 2 emulator windows apple 2 emulator windows](https://cdn-learn.adafruit.com/assets/assets/000/077/718/medium800/programming_Untitled.png)
Now with the AOT compiler on Rosetta 2, Apple Silicon is able to translate and compile the code on the fly through dynamic binary translation. Earlier with Rosetta in 2006, Apple was only using the Just-in-time (JIT) compiler for static binary translation. Now the question comes, how does this translation happen and how is Rosetta managing to run heavy x86 apps on ARM Macs seamlessly? You can attribute the main reason to the Ahead-of-time (AOT) compiler that Apple has deployed on Rosetta 2. Since x86 and ARM architectures are drastically different, this translation is required for smooth functioning of Intel-based apps. When I say instruction set, it means the commands (also called machine code in computing) needed to execute a program of one architecture on another. But how does this powerful translation layer work? There is little information on this subject so we will try to dissect Rosetta 2 and understand how Rosetta 2 functions.įirst of all, Rosetta 2 is a translation layer which means it translates the instruction sets of Intel x86 architecture into ARM-based Apple Silicon architecture. For the uninitiated, Rosetta 2 is the translation layer that allows you to use Intel-based apps on Apple Silicon Macs. After the introduction of Rosetta in 2006 during the PowerPC-Intel transition, Apple has announced a much-improved Rosetta 2 in 2020 for seamless Intel-Apple Silicon transition.