Site icon Random Thoughts

The Only M1 Benchmark That Matters

I’ve got a new Apple laptop, so I thought I’d do an Emacs build benchmark. Building Emacs is what people do on computers, right? At least if I extrapolate from myself, which is the only natural thing to do.

It’s called proof by induction. Look it up, nerds.

So here’s the benchmarks:

My Main Build Machine AMD Ryzen 7 3700X (8 Core/16 Threads) 2m14s 7m31
My Lenovo Carbon X1 Laptop Intel(R) Core(TM) i7-10610U CPU (4 Core/4 Threads) 6m22s 15m22
My Old Apple Laptop Intel(R) Core(TM) i5-7360U CPU (2 Core/4 Threads) 7m13s 12m33
My New M1 Apple Laptop Apple M1 (4-to-8-ish Cores) 2m44s 6m37s

The next-to-last column is with -jTO-THE-MAX, and the last column is with -j1.

I’m impressed! The M1 is able to build Emacs almost as fast as my AMD machine… which is a lot bigger.

Of course, on Debian I’m using gcc and on Macos I’m using clang, so it’s an apples-to-some-different-brand-of-apples comparison.

It’s even more impressive how much faster this laptop is compared to the Apple laptop from… 2019? Yeah. It’s more than twice as fast! And doesn’t have a fan! The old Apple laptop would sound like a VAX in a hurricane while building Emacs!

And it’s also twice as fast as the laptop I use daily here on the couch; last year’s Lenovo Carbon X1, which is just embarrassing. Lenovo! Get on it! Make an ARM laptop that’s fast!

For the first time in my life, I have Apple envy. That is, for the first time ever, they’ve made a laptop that’s clearly superior to what’s available for us Linux peeps. My only comfort is that the Apple keyboard still sucks. Yeah! And it doesn’t have a TrackPoint! Yeah! My laptop is still the best! Yeah! Take that!

Yeah! I’m not the least envious!

*sniff*

Edit some hours later:

But one thing that would be interesting to look at is Emacs performance on M1 vs the other machines. And a way to broadly look at that is to see how long it takes to byte-compile a bunch of Emacs Lisp files: This exercises much of Emacs, except display-related stuff.

So: Benchmarking with

rm `find lisp -name '*.elc'`; time make -jMAX

I get:

My Main Build Machine AMD Ryzen 7 3700X (8 Core/16 Threads) 0m57s
My Lenovo Carbon X1 Laptop Intel(R) Core(TM) i7-10610U CPU (4 Core/4 Threads) 4m13s
My Old Apple Laptop Intel(R) Core(TM) i5-7360U CPU (2 Core/4 Threads) 5m33s
My New M1 Apple Laptop Apple M1 (4-to-8-ish Cores) 1m33s

Here the AMD clearly wins over the ARM, but per-core performance is in advantage of the ARM. And, of course, the ARM soundly wins over both of the other two laptops.

Exit mobile version