News for hackers. Stuff that matters.
Re:Apple Silicon M1 chip in MacBook Air outperforms high-end... by marcan_42 on Thursday November 12, 2020 @06:44AM (#25068781)
Until all software is ported to ARM, it will run in emulation, which is going to be slower in most cases. People invested in plug-in ecosystems, like DAWs or video editing, will likely have an endless long tail of plug-ins that aren't getting ported, or that require a re-purchase to get an ARM version. And due to Rosetta's architecture, you can't mix ARM and x86 plug-ins (in-process, like VSTs - Apple wants you to use AUv3 which is out of process but nobody does that), so you will be running your entire workflow under emulation until you can make the switch hard and all at once. And some of your software will never make it.

Mark my words, this is going to be a massive shit show for people using those ecosystems, for 5 years if not 10. It already happened with the PPC transition.

Re:Apple Silicon M1 chip in MacBook Air outperforms high-end... by valuearb on Thursday November 12, 2020 @11:58AM (#25071786)
Rosetta2 is mind blowing.

“ fun fact: retaining and releasing an NSObject takes ~30 nanoseconds on current gen Intel, and ~6.5 nanoseconds on an M1”

https://mobile.twitter.com/hhariri/status/132678854650246349...

“…and ~14 nanoseconds on an M1 emulating an Intel”

Re:Apple Silicon M1 chip in MacBook Air outperforms high-end... by marcan_42 on Thursday November 12, 2020 @01:22PM (#25072897)
How does it handle DSP inner loops? SIMD? x87 code? Floating point corner cases like denormals? What about the inevitable cases where impedance mismatch between the architectures causes severe performance loss? Is Rosetta2 binary translated code guaranteed to be realtime-safe if the original code was? What about the JIT? There's no way that is realtime-safe. What happens if some realtime code triggers the JIT?

We still can't emulate some 20-year-old machines at full speed on modern hardware due to platform impedance mismatches. Rosetta2 may be good, but until someone runs a DAW on there with a pile of plug-ins and shows a significant performance gain over contemporary Intels (and zero unexpected dropouts), I'm not buying the story of Rosetta2 amazingness.

Re:Apple Silicon M1 chip in MacBook Air outperforms high-end... by valuearb on Thursday November 12, 2020 @02:11PM (#25073616)
Rosetta2 is not emulation.

Edit: And Apple has already discussed how Rosetta2 handles complexities like self modifying code. It probably won’t help with performance but the M1 has a lot of power to keep even that code running fast.

But more importantly video/audio apps aren’t going to be using Rosetta2 for very long. 99% of code written for x86 MacOS is going to be a simple recompile to native, if not more. Not going native when your competitors did and got 2-5x faster is corporate suicide.

Re:Apple Silicon M1 chip in MacBook Air outperforms high-end... by marcan_42 on Thursday November 12, 2020 @07:45PM (#25077405)
Rosetta2 is emulation just as much as qemu and Dolphin are emulation, both of which also use binary translation like every other modern emulator. Apple marketing just doesn't want you to call Rosetta2 an emulator because "emulators are slow". Anything running software on a different architecture is an emulator.

If you read my parent comment you'll see how DAWs are going to be using Rosetta2 for years to come, maybe even a decade, for many people. Even if there are ARM versions, you won't be able to use them until all your dozens if not hundreds of plug-ins, some of which won't be actively developed any more or will require a re-purchase for an ARM version, have also migrated.

People invested in such ecosystems aren't just going to up and give up half their collection of software, or spend thousands re-purchasing upgrades to get ARM versions.

Re:Apple Silicon M1 chip in MacBook Air outperforms high-end... by bigfudge on Thursday November 12, 2020 @10:12AM (#25070689)
Apple is a lot bigger market now than PPC transition though
Re:Apple Silicon M1 chip in MacBook Air outperforms high-end... by asah on Thursday November 12, 2020 @08:02AM (#25069378)
won't emulation catch up in those timeframes ? still, 3+ yrs which is a long time...
Re:Apple Silicon M1 chip in MacBook Air outperforms high-end... by AnthonyMouse on Thursday November 12, 2020 @09:04AM (#25069927)
Three years isn't that long for CPU performance gains anymore, but even if it was, it isn't the emulation that gets faster, it's the hardware. Contemporary ARM machines emulating x64 would still be slower than contemporary x64 machines natively executing x64.

You're also going to be in a bind if Apple decides they don't care about the long tail and stops supporting emulation before all of your plugins have been converted (if they ever are).

Re:Apple Silicon M1 chip in MacBook Air outperforms high-end... by sroussey on Thursday November 12, 2020 @09:52AM (#25070459)
There is no emulation per se, there is a one time AOT translation of Intel to Arm. Then that native code just runs. So no emulator is running on the cpu while the app is.

There is an exception for apps with JIT and those will perform poorly (think Chrome and every Electron app).

Re:Apple Silicon M1 chip in MacBook Air outperforms high-end... by marcan_42 on Thursday November 12, 2020 @01:26PM (#25072963)
"Emulation" is a catch-all term that includes binary translation, static and dynamic, which every modern emulator uses (Apple just doesn't want you to use that name because people think emulation is slow). Rosetta2 is not a pure static translator, because such a thing can't exist (see: self-modifying code).

Just because binary translation is used doesn't mean it's magically as fast as native code. Converting code that runs on architecture A to run on architecture B always has corner cases where things end up a lot slower by necessity.

Re:Apple Silicon M1 chip in MacBook Air outperforms high-end... by AnthonyMouse on Thursday November 12, 2020 @10:02AM (#25070582)
> So no emulator is running on the cpu while the app is.

Nonetheless, the translated code is going to be slower than ordinary native code because a lot of the information compilers use for optimization isn't available in the resulting binary, so the translator has to be extremely conservative in its assumptions.

Re:Apple Silicon M1 chip in MacBook Air outperforms high-end... by valuearb on Thursday November 12, 2020 @12:00PM (#25071802)
Yet the translated code will still run faster on the M1 than the original code runs on x86.
Re:Apple Silicon M1 chip in MacBook Air outperforms high-end... by marcan_42 on Thursday November 12, 2020 @01:28PM (#25072996)
Citation needed. Not a microbenchmark, or a single example of some software. Actual sustained mixed workload usage of real life applications. Especially realtime-sensitive stuff like DAWs (where you have the added risk that calling into the JIT in the middle of a realtime thread can completely screw you over; keeping realtime-safe code realtime-safe under dynamic or even static binary translation is a whole extra can of worms).
Re:Apple Silicon M1 chip in MacBook Air outperforms high-end... by valuearb on Wednesday November 18, 2020 @01:50AM (#25133886)
Benchmarks are now out, and x86 Chrome is faster on the M1 MacBook Air than the x86 MacBook Air.
Re:Apple Silicon M1 chip in MacBook Air outperforms high-end... by valuearb on Thursday November 12, 2020 @01:54PM (#25073377)
Sustained benchmarks await production hardware. But it will be surprising if Rosetta2 translated apps run slower. Not only will system calls be native, but common operations like retain/release are 2x faster under Rosetta3.

https://mobile.twitter.com/hhariri/status/132678854650246349...

Re:Apple Silicon M1 chip in MacBook Air outperforms high-end... by marcan_42 on Thursday November 12, 2020 @07:53PM (#25077461)
That's a microbenchmark. There are a myriad reasons why one specific thing might be faster under a new CPU even under emulation. That doesn't mean other things won't be much slower.
Re:Apple Silicon M1 chip in MacBook Air outperforms high-end... by dylan604 on Thursday November 12, 2020 @01:00PM (#25072620)
Oh dear lawd, Electron apps can get slower?
Re:Apple Silicon M1 chip in MacBook Air outperforms high-end... by sroussey on Thursday November 12, 2020 @03:45PM (#25074739)
Oh yes. JS -> bytecode-> JIT for x64 -> interpreted and converted to ARM (both using CPU and memory).

And most use electron-builder which does not have Mac Arm support. Expect super slow mode for a while!

Re:Apple Silicon M1 chip in MacBook Air outperforms high-end... by marcan_42 on Thursday November 12, 2020 @01:23PM (#25072921)
We still can't emulate some 20+ year old machines at native speed on modern hardware under certain conditions. Emulation always has corner cases where some awkward impedance mismatch between both architectures causes severe performance loss.