Compilation times: 10x difference between M1Max and EPYC 7232
I have a project where code is massively autogenerated. It has a bunch of dependencies too, but the main crate is 2000 files and 600+K lines. Rust 1.78 (we have some stack overflow issues on 1.80 and didn't have a chance to look into that)
This crate takes 49 minutes to compile in release on my M1Max Macbook Pro with 64GB RAM, which is quite annoying. Well, we didn't chose Rust for the compilation speed, so no complaints, but today after I had to change this crate multiple times I decided to look around for a better option and created a FreeBSD "jail" on my TrueNAS storage server which is powered by EPYC 7232 CPU (8 cores) and 64GB of RAM.
(theatrical pause)
5 minutes and 44 seconds.
WHY? Mac builds for arm64 and AMD naturally for x86_64, but...but...
EPYC CPU mark is 1767 and M1 Max is 3837
Update: restarted the Macbook just in case, run the compilation with --timings and found nothing interesting - horizontal line for the active unit (because there's only one) and usual CPU usage graph going up and down.
Cross compilation on FreeBSD didn't work, the ring crate required by rustls wants OSX SDK for aarch64-apple-darwin and just plain refuse to compile (with a gazillion of stupid compilation errors) for aarch64-unknown-none.
Tried to do the other way around - compile on Apple for FreeBSD and the same ring crate now can't find a fricking assert.h which is obviously present. Gave up.
Tried on a Ryzen 7980X3D 96GB RAM RHEL (Rocky Linux) machine: 1min53sec. What the heck is going on with this Apple thingy.