Hacker News new | ask | show | jobs
by samwillis 1539 days ago
Yes, I read the article and was in fact aware of UTM, also noted:

> the performance penalty is significant

I was asking the genuine question as to if it would be theoretically possible to use Rosetta as part of the emulation for a VM to potentially help it to perform better?

For example could a tool be installed within a guest OS that effectively send binaries to Rosetta for translation before execution?

It just seems to me that if Apple have done such an incredible job with Rosetta wouldn’t it be brilliant if it was possible to use that within an emulated VM on Apple silicone.

1 comments

No rosetta doesn't do system level emulation. System vs app level are distinctly different problems.

Att the app level rosetta can operate at link time (yes it does AoT, but that's essentially just caching), where it knows things like what things are text regions, what the entry points are, it can assume that the code is "correct" (if your code is buggy natively, then rosetta won't stop it going wrong), etc.

System level emulation means rosetta (or whatever) loses that transparency, so can't precompile, and can't make any assumptions about code behaving properly. To get an idea of what the performance impact is you should check the performance of JIT compiled code under rosetta. Rosetta ensures that the JIT will work, but the perf hit is staggering. System level emulation basically means treating everything as being JIT code.

I'm sure a system level emulator (Qemu?) could do better than for example just slapping a system emulator mode into rosetta, but that would be because rosetta is optimized for app level emulation.