> Rosetta 2 translates the entire text segment of the binary from x86 to ARM up-front. Do I understand correctly that the Rosetta is basically a transpiler from x86-64 machine code to ARM machine code which is run prior to the binary execution? If so, does it affect the application startup times?
> If so, does it affect the application startup times? It does, but only the very first time you run the application. The result of the transpilation is cached so it doesn't have to be computed again until the app is updated.
Why is Rosetta 2 fast?
151–160 of 367 posts
Re: Why is Rosetta 2 fast?
#152Earlier quoted context omitted.
I am the creator / main author of Rosetta 2. I don't have a blog or a Twitter (beyond lurking).
Thanks for your amazing work! May I ask – would it be possible to implement support for 32-bit VST and AU plugins? This would be a major bonus, because it could e.g. enable producers like me to open up our music projects from earlier times, and still have the old plugins work.
Re: Why is Rosetta 2 fast?
#153Earlier quoted context omitted.
Apple reportedly has already ported many of it's secondary cores to RISC-V Really? In current hardware or is this speculation?
If you've got some management core somewhere in your silicon you can, with RISC-V, give it a MMU but no FPU and save area. You're going to be writing custom embedded code anyways so you get to save silicon by only incorporating the features that you need instead of having to meet the full ARM spec. And you can add your own custom instructions for the job at hand pretty easily. That would all be a terrible idea if you…
Re: Why is Rosetta 2 fast?
#154Earlier quoted context omitted.
>That's not going to happen unless Apple decides to switch from ARM to RISC-V, and... why would they? They've got 15 years experience and essentially full control on ARM. Two points here. • First off, Apple developers are not binded to Apple. The knkwledge gained can be used elsewhere. See Rivos and Nuvia for example. • Second, Apple reportedly has already ported many of it's secondary cores to RISC-V. It's not unrea…
Apple reportedly has already ported many of it's secondary cores to RISC-V Really? In current hardware or is this speculation?
So to answer your question, it is not in currently in hardware, but it is more than just speculation.
[0]https://www.semianalysis.com/p/sifive-powers-google-tpu-nasa...
Re: Why is Rosetta 2 fast?
#155Rosetta 2 is great, except it apparently can't run statically-linked (non-PIC) binaries. I am unsure why this limitation exists, but it's pretty annoying because Virgil x86-64-binaries cannot run under Rosetta 2, which means I resort to running on the JVM on my M1...
$ file a.out
a.out: Mach-O 64-but executable x86_64
$ tool -L a.out
a.out:
$ ./a.out
Hello, world!Re: Why is Rosetta 2 fast?
#156Rosetta 2 is great, except it apparently can't run statically-linked (non-PIC) binaries. I am unsure why this limitation exists, but it's pretty annoying because Virgil x86-64-binaries cannot run under Rosetta 2, which means I resort to running on the JVM on my M1...
Statically linked binaries are officially unsupported on MacOS in general, so there's no reason to support it on Rosetta either. It's unsupported in MacOS because it assumes binary compatibility on the kernel system call interface, which is not guaranteed.
Re: Why is Rosetta 2 fast?
#157I am interested in this domain, but lacking knowledge to fully understand the post. Any recommendations on good books/courses/tutorials related to low level programming?
Re: Why is Rosetta 2 fast?
#158I wonder how much hand-tuning there is in Rosetta 2 for known, critical routines. One of the tricks Transmeta used to get reasonable performance on their very slow Crusoe CPU was to recognize critical Windows functions and replace them with a library of hand-optimized native routines. Of course that's a little different because Rosetta 2 is targeting an architecture that is generally speaking at least as fast as the…
Re: Why is Rosetta 2 fast?
#159Earlier quoted context omitted.
>That's not going to happen unless Apple decides to switch from ARM to RISC-V, and... why would they? They've got 15 years experience and essentially full control on ARM. Two points here. • First off, Apple developers are not binded to Apple. The knkwledge gained can be used elsewhere. See Rivos and Nuvia for example. • Second, Apple reportedly has already ported many of it's secondary cores to RISC-V. It's not unrea…
For me, those two points make it clear that it would be possible for Apple to port to RISC-V. But it's still not clear what advantages they would gain from doing so, given that their ARM license appears to let them do whatever they want with CPUs that they design themselves.
Re: Why is Rosetta 2 fast?
#160Earlier quoted context omitted.
Thanks for your thoroughly objective insights. I especially appreciate the concrete examples.
Here you go for a concrete example: https://news.ycombinator.com/item?id=33493276