https://www.jeffgeerling.com/blog/2021/apple-m1-compiles-linux-30-faster-my-intel-i9 Skip to main content Jeff Geerling Main menu * Blog * Projects * About The Apple M1 compiles Linux 30% faster than my Intel i9 June 1, 2021 (With a caveat: I'm compiling the ARMv8 64-bit Pi OS kernel.) It seems every week or so on Hacker News, a story hits the front page showing some new benchmark and how one of the new M1-based Macs matches or beats the higher-priced competition in some specific benchmark--be it GeekBench, X86-specific code, or building Emacs. Well, here's my quick story. I've been doing a lot of work with Raspberry Pis lately--more specifically, work which often requires recompiling the Pi OS Linux kernel for the aarch64 architecture. I recompile the kernel enough I made my own shirt for it! Linux shirt from Red Shirt Jeff.com - It has been 0 days since I recompiled the Linux kernel With this Docker-based environment on my 2019 Intel i9 16" MacBook Pro, I can compile the kernel from scratch in about 12 minutes. The Intel laptop cost over $3000 when I bought it, and the thing is basically a frying pan on my legs and has two obnoxiously-loud fans running full blast whenever you even look at it sideways. I bought both an M1 10 Gbps Mac mini and a M1 MacBook Air to replace the 16" Pro--for the same total price--and I ran the same compile on it, using the exact same configuration. Total time for the test was 9 minutes on the mini (which has a fan to keep the CPU cool under load) and 10 minutes on the Air (which doesn't have a fan, so it starts to throttle after a while). M1 vs i9 Linux Kernel Recompile for Raspberry Pi OS And even if the mini's fan came on during the build (it probably did), I couldn't even hear it over the ambient 32dB environment in my office. The Air was blissfully silent. That's not fair! Yeah, well, it's one of the things that takes the most time and makes an impact on my own workflow. I know that cross-compiling Linux on an Intel X86 CPU might not be as fast as compiling on an ARM64-native M1... but that's not the point. This is a very real benchmark that impacts my ability to get work done. And it's faster on even the cheapest low-end M1 Mac. And the fans are silent (or nonexistent), and the heat output and energy consumption is minimal. I mean heck, the power supply for the i9 MacBook Pro is comically large compared to the Air's supply: M1 MacBook Air vs Intel 2019 i9 16 inch MacBook Pro USB-C Power Adapter And even the 96W adapter is smaller than most PC laptop PSUs I've used, especially for the type of 'luggable desktop' machine commenters will, I'm sure, point out, which could destroy my M1s with more cores (and more power consumption and heat)! What matters? In the end, I'm happy with my decision--overall. The M1 platform definitely has some growing pains. For example, my mini has weird issues on both HDMI and DisplayPort connections so far: * If using HDMI to my LG 4K display at 60 Hz, the display just blanks out entirely for 2-4 seconds every 5 minutes or so. No clue why. * If using DisplayPort through a CalDigit TS3 Plus dock, the display works great, but when I put the mini to sleep, or the display shuts off, the LG display keeps restarting itself every 10 seconds or so, which is highly annoying. What matters most to me, though, is the fact that I can do my work faster, with less energy use, way longer battery life, and all without burning my legs every time I use my laptop on my lap. I was questioning whether I'd still use an Apple laptop after my bad experiences with both the Touch Bar and non-Touch Bar 2016 MacBook Pro, and the 2019 MacBook Pro had just enough charm to keep me running macOS daily. But if these first-generation M1 Macs are anything to go by, I think I'm going to be a happy macOS user for a while longer. Now, if only Apple and Raspberry Pi could partner up and build an SBC with the M1... Further reading * Kubuntu Focus M2 Linux laptop review and MacBook Pro comparison * Hardware RAID on the Raspberry Pi CM4 * WiFi 6 gets 1.34 Gbps on the Raspberry Pi CM4 macbook air mac macbook pro intel m1 arm64 linux benchmarks * Add new comment Comments Steven Lee - 2 hours ago Do you have a recommendation for virtualizing ARM Linux VM with vagrant support on M1 Macs? * Reply Jeff Geerling - 2 hours ago In reply to Do you have a recommendation... by Steven Lee So far I'm just using Docker for my VM needs, but I would like to find a good solution that's more full-featured like VirtualBox was, and not just a containerization wrapper. * Reply Logan - 1 hour ago > If using HDMI to my LG 4K display at 60 Hz, the display just blanks out entirely for 2-4 seconds every 5 minutes or so. No clue why. FWIW, this happens to me on my Intel MacBook + 4k display often as well. * Reply Rachel Lawson - 1 hour ago I get a feeling that, to have a "server like" docker environment of the future, that docker environment will need to be ARM based, anyway. Cloud servers will mostly go that way, I reckon. Intel machines will be doing a lot of cross-compiling soon... * Reply Jeff Geerling - 1 hour ago In reply to I get a feeling that, to... by Rachel Lawson This was what ultimately led me to decided to ditch the i9 before hearing whatever comes out at WWDC; I do a ton of ARM stuff anyways, and this will let me also switch some projects more easily to AWS Graviton servers, which are slightly cheaper for the same performance. * Reply Scott - 1 hour ago Yeah M1 R-Pi... it would kill Apple's entire business model. Cheap system running reasonably useful, user controlled, private OS more powerful than any of the competition? The Foundation couldn't keep them coming fast enough. I wouldn't shed a tear for neither Apple nor Intel. AMD might be able to pivot fast enough to keep up. I happen to feel your irritation with the display issue on the Mini. I have a gripe of my own for the M1 MBP. I have a LG 4k HDR-10 monitor I originally got to compliment my MBP but has ended up on my main Windows desktop. No matter what I do I get screen flickering either via USB-C to DP or USB-C to HDMI. Some people make excuses for it, and say it doesn't matter to them. I can't stand it in the least, it breaks concentration, ruins movies, etc. There's no way to fix it. Windows? No big deal, no flickering, same monitor settings. MacOS has some compatibility issues for sure. Not everything "just works". * Reply Jeff Geerling - 1 hour ago In reply to Yeah M1 R-Pi... it would... by Scott The annoying thing is, I get perfect behavior (60 Hz, no flicker, no sudden dropouts) using Mac -> CalDigit -> DisplayPort -> LG monitor, but when it sleeps or when the Mac turns off the display, it does that weird on/off loop until the display is woken up again. Neither my outgoing i9 MacBook Pro or even the 13" M1 Air exhibits the same behavior. Something must be funky with the M1 mini :( I did just upgrade to 11.4 today; we'll see if that makes a difference. * Reply samrolken - 14 min ago > cross-compiling Linux on an Intel X86 CPU isn't necessarily going to be as fast as compiling on an ARM64-native M1 to begin with Why would this be the case? * Reply Jeff Geerling - 3 min ago In reply to > cross-compiling Linux on... by samrolken Eh... I should probably be more careful with that statement--there are some things (which I'm not sure are present in the Linux kernel--tbh I'm not that deep into compiler use to say anything intelligent there) that can be slower cross-compiling. * Reply Search [ ] [Search] Geerling Family Crest All content copyright Jeff Geerling. Top of page.