Hacker News new | past | comments | ask | show | jobs | submit login

Is all the software necessary to pull this off already compiled for arm64?

I've read claims that rosetta 2 is fast. I haven't seen results about m1 running x86_64 through rosetta vs intel though.




I ran a multithreaded poker solver (a Windows executable) on top of Wine on Rosetta on base MacBook 13 M1 and it beats the performance of base MacBook Pro 16 inch (Intel 6-core) with Windows running on bare metal by a small margin.

(M1 fan actually turned on, which is a rare occurrence; at the same time MacBook Pro 16 Intel would be frying my laps. Ballpark estimates on the internet seem to pin it down beating MBP16 6-core i7 and trailing MBP16 8-core i9 on pure CPU performance benchmarks, power obviously much lower; GPU far better than Intel UHD 630 and close but not quite as good as Radeon 5300M.)

For most applications that aren't especially pathological for Rosetta (e.g. V8 x64), it seems not more than 10-30% slower than arm64.

(Don't feel too surprised. If your binary is static code, it is pretty much a static compiler from x86 to ARM [albeit an incredibly well executed one], so not magic: in fact if you disable SIP on your system, you can peek into the translated executables in `/var` and look into them via `objdump`/`otool`)

--

Another benchmark that is a bit worse for Rosetta:

Compiling gRPC from clean source (not quite Apple to Apple comparison cause under Rosetta, it runs LLVM x86 codegen vs LLVM arm64 codegen outside Rosetta and I did not want to mess with the flags). I also feel like process creation under Rosetta can be more expensive, but not sure.

- MacBook 16 (i7-9750H, 16GB): 67s

- MacBook 13 (M1, 8GB): 48s

- MacBook 13 (M1, 8GB, Rosetta): 85s

Now I have my Intel Macs to list on Craiglist...


What solver are you running? What kind of performance do you get with these setups? I'm curious because I only hear about more core-heavy builds for piosolver. Thanks


I tried PioSolver free version with identical settings on all machines and targeted a certain exploitation level and compared the time it took to finish the task. Performance on M1 is close to a desktop 3600X (admittedly weak cooler was installed on that machine)


There are various benchmarks on YouTube showing the performance is reasonable. Native code is obviously faster but with rosetta it seems like the M1 is a mid tier Core i5 or Ryzen 3 series in performance. Not bad at all but not top tier.


I mean it’s totally crazy, emulation of Arm on x86 has always felt extremely slow, to me anyway.


Apple put some special sauce in the M1 to help make rosetta fast. Support for the x86 TSO memory model, for one thing.


Also ARM now has a bunch of instructions that are blatantly there for efficient x86 emulation, though ARM won't tell you that in the docs.


IBM POWER9 supports some memory ordering instructions that (as I understand) would in theory be useful for x86 emulation, but a) I'm unsure if anyone actually uses them and b) They are removed from POWER10


I don't think Apple generates those, though.


Can that secret sauce just be to slow down Intel based macs in the OS layer?




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: