9 ms·
Why aren't programs distributed by the Mac App Store pre-translated once and the translation downloaded to the Mac? They'd still have to be run under rosetta2
by gumby 6y ago
Why aren't programs distributed by the Mac App Store pre-translated once and the translation downloaded to the Mac?
They'd still have to be run under rosetta2 (because programs can write code and branch to it) but a lot of computation could be done once rather than every time.
- olliej 6y agotranslation of most apps doesn't take a significant amount of time, and have it pretranslated would mean shipping code that was not signed by the app developer.
- neurostimulant 6y agoBut isn't apple store already re-sign applications code with apple's own key so they can do stuff like this? Or is it only on iOS?
- gumby 6y agoiOS definitely does this, optimizing for the different supported devices. I hope they start doing that with future Mx macs.
- rarepostinlurkr 6y agoApps installed via MAS and packages are pre translated (at install time)
- apexalpha 6y agoSo is this a little bit like Android apps being translated into Java Byte Code at install?
- gumby 6y agoIt’s the other way around: an intermediate state of compilation is uploaded (basically the internal state after all non-machine-specific optimizations have been done, like hoisting invariants out of loops, etc). The App Store finishes compiling with the flags for the various CPUs supported (iPhone 6, iPhone 12, etc).
- ztjio 6y agoNot sure, but, my educated guess is that it will be more efficient as they improve Rosetta 2 to do this on demand instead of pre-translating every app on the store every time Rosetta 2 is updated. Even if that means the users have to retranslate, that's still essentially "free" (to Apple) distributed compute.