macOS performance issues (much slower than Linux/Windows)
⚓ Rust 📅 2025-11-17 👤 surdeus 👁️ 10As a little follow-up to:
Why is performance (throughput) of my Rust application so much worse on macOS?
Here are some test results:
(all values in MiB/s)
The corresponding flame graphs:
Actually, the single-thread performance of the M2 Pro should blow away my Ryzen CPU:
I understand that, on the PC (x86-64), using -Ctarget-cpu=native allows the compiler to use AES-NI, which certainly gives a big boost to my code that builds upon the AES block cipher.
Still, why is the macOS build so much slower, even in the "default" case?
Also, doesn't the Apple M2 CPU support ARM Crypto instructions that should accelerate AES computations in the -Ctarget-cpu=native case? But, apparently, on macOS, using adding the -Ctarget-cpu=native option to RUSTFLAGS doesn't make any difference at all...
So, is rustc just not optimized that well for Apple Silicon, or am I missing something here?
Best regards.
5 posts - 2 participants
🏷️ Rust_feed


