Apple Wiki
Apple Wiki

Dynamic recompilation is a virtual machine implementation approach used to speed up execution of programs that are run in emulation.


To execute a program written for another computer architecture, the emulator translates (recompiles) the existing machine code into native code for the current system. This process is significantly slower than running pre-existing native software. A dynamic recompiler will save the translated code to cache memory or the drive, so that the next time the recompiled code is run, there is no longer a performance penalty from the translation process.[1]


The original Mac 68k emulator by Gary Davidian at Apple Computer utilized just-in-time compilation on PowerPC processors. Eric Traut updated this to run 68k code more efficiently on PCI-based Power Macintosh models through dynamic recompilation.[2] Traut's work on the project led to a patent on the process.[3] He later joined Connectix, which also produced a dynamic recompiler called Speed Doubler to improve emulation performance on early PowerPC Macs.[4]


With the introduction of Macs with Apple M1 processors in November 2020, Apple introduced Rosetta 2 to recompile Intel code to run on Apple processors. However, some users expressed concern that the swap files being generated by the translation of non-native code were wearing out the life expectancy of Macs' solid-state drives, especially in base models configured with less RAM.[5] This issue was addressed by Apple in the macOS 11.4 update.[6]


  1. Dynamic translation at the Free On-Line Dictionary Of Computing. 1994-12-13.
  2. Eric Traut: Distinguished Engineer, Microsoft. 2006-10-03. Updated 2007-09-14. Archived 2008-01-05.
  3. Method for emulating guest instructions on a host computer through dynamic recompilation of host instructions by Eric P. Traut, Espacenet patent search. 1998-08-04.
  4. Speed Doubler Quickens the Pace by Richard C.S. Kinne, TidBITS. 1995-08-28.
  5. Swapgate and Rosetta 2 by Yebubbleman, MacRumors Forums. 2021-06-16.
  6. Apple resolved M1 Mac SSD wear reporting issue in macOS 11.4 by William Gallagher, AppleInsider. 2021-06-04.

External links[]

Utility stub shuffle This article is a stub. You can help by expanding it.
FOLDOC logo This page uses GFDL licensed content from the Free On-line Dictionary of Computing.