19 ms·
The Apple M1 compiles Linux 30% faster than my Intel i9
- rvz 5y agoGood! The M2 will be even more faster. Can't wait to skip the M1 then.
- geerlingguy 5y agoWith my luck, Apple's going to release some new devices that will blow the M1 Macs I just bought last week out of the water... that is the way of things, with tech! I'm still trying to unlearn my fear and trepidation surrounding the use of my laptop while not plugged into the wall. I was always nervous taking the laptop anywhere without the power adapter in hand, because 2-3 hours of video editing or compilation work would kill the battery. The Air can go a full day!
- dogma1138 5y agoThe M1 is great indeed but one thing holds true for Apple never buy a first gen device, 3rd Gen onwards is usually where you get to see them becoming viable for long term support. While the M1 is great there are clearly issues to be ironed out even if it’s just the limited bandwidth available for peripherals. I’m also betting on major GPU upgrades over the next 2 generations.
- kstrauser 5y agoI mean, kind of, but it seems that the main issue here with the M1 is that it's only 30% faster than an i9. If I were buying a new Mac today, I would only consider an M1 system. It seems to be better at literally everything I want to do with it than the Intel equivalent. While M2 will undoubtedly be better yet, I see no downside to jumping aboard M1 today for must people who aren't running specialized software.
- dogma1138 5y agoM2/M3 is where they’ll likely finalize the majority of their architectural features from a CPU perspective just look at what happened to first Gen Apple devices that used an Apple silicon like well the original iPhone or the Apple Watch series 1. The M2/3 is when you’ll see a SoC that is finally designed for laptops and desktop computers and where you would likely see some additional ISA improvements on the CPU and on the GPU side too like hardware Ray Tracing support which will surely come.
- paxys 5y agoPlus, I don't think Apple has really released a "Pro" M1 laptop yet. The current M1 MacBook Pro has max 13 inch screen, max 16 GB RAM, max 2 TB storage, only 2 Thunderbolt/USB ports, only a single external display supported, no external GPU supported. If I had to guess I'd say they meant to call this just MacBook but tacked on the Pro since they discontinued the non-Pro line entirely.
- djrogers 5y agoThe 13” MBP line has been bifurcated for a couple of years, the M1 replaced the low-end of that line. The split started when Apple first tried to replace the MacBook Air with the MacBook Pro sans-touchbar (aka the MacBook escape), and the low end Pro hung around even after they reversed course and brought out the new retina Air.
- dogma1138 5y agoThere can be no real pro M1 yet, I don’t have that much issues with the 16GB limit tho some might people might but the other limitations are really due to SoC itself it doesn’t have sufficient bandwidth to support external GPUs multiple displays and a lot of high bandwidth peripherals. My own personal theory is that the M1 was not originally designed for laptops it think it was originally intended as an iPad Pro/Pro+ SoC to compete with the higher end Surface devices. This is why likely external GPU support and bandwidth for peripherals wasn’t prioritized, its more than enough for a tablet. I’m not sure if Apple really expected to get that much performance out of it from the get go, when their early samples did they made a decision to launch a full line including laptops despite the rest of the SoC not being designed for that.
- cpr 5y agoIf they announce the rumored M2 Macs next week, you might be within the 15 days to return the M1's and order (with plenty of waiting) the M2's.
- eyelidlessness 5y agoI think it’s pretty likely M2 (or M1X, or whatever they brand it) MacBook Pros will be announced next week at WWDC, given the recent rumors generally coalescing. They may not be released right away but most rumors have suggested a summer release. Not that you should regret your purchase, but for (future) reference it’s a really good idea to check the rumors when considering a non-urgent Apple purchase.
- vmception 5y agoI really can't wait for my fleeting happiness of seeing their next processor! The rumors really describe the perfect machine for me and many people's use cases.
- flatiron 5y agomacOS though? I don’t feel very productive using their OS. I would rather have a slightly slower laptop and feel more productive. But I don’t compile anything locally or anything. It’s all in the cloud and stuff.
- selectodude 5y agoSounds like you're not the target market then. Apple generally tries to sell computers to people who feel productive using their OS.
- geodel 5y agoThis is surprising. Are we really running out of people who would try run datacenter and an electron App on Apple laptop and then tell us here how these machines are not for professional users.
- vmception 5y agoI will absolutely try to do that with a M2 processor and 64gb RAM per device
- nodesocket 5y agoYou can return it (within 30 days) and get the new generation. I am gonna upgrade my 16" MBP Intel i9 as soon as I can buy the Apple Silicon in 16".
- geerlingguy 5y agoNever thought of that... but I'll cross my fingers then and see what Apple releases. These Macs may still be perfect for my needs though. 10G on the mini means I skip the giant external adapter, and the Air doesn't have the dumb Touch Bar.
- rowanG077 5y agoI really hope Apple can control themselves with these CPUs. The M1 has the perfect thermal envelope for the Macbook Pro. No thermal throttling ever. I greatly fear the future were Apple starts going down Intels path were you buy a sick CPU on paper. But once you actually try to do anything with it it throttles itself into the ground.
- klodolph 5y agoHistorically, this is one of the reasons Apple went with Intel CPUs to begin with. The PowerPC G5 was a nice processor but never ended up with a thermal envelope acceptable for a laptop. So from 2003 to 2006, you could buy a Mac G5 desktop, but if you wanted a laptop, it was a G4. 2006 was the beginning of the transition to Intel, who made better processors that Apple could put in laptops. It's not the only reason Apple switched to x86, but it perhaps the most commonly cited factor.
- geerlingguy 5y agoI complain about how hot the i9 gets... but then I remember the period where Apple was transitioning from G4/G5 to Intel Core 2 Duo chips... in both cases they were _searing_ hot in laptops, and Apple's always fought the battle to keep their laptops thin while sometimes sacrificing anything touching the skin of the laptop (unlike most PC vendors, who are happier adding 10+mm of height to fit in more heat sinks and fans!).
- selectodude 5y agoHeck, even before that with the 867MHz 12" Powerbook G4. Pretty sure that thing is why I don't have children.
- secondcoming 5y agoMy i7-10875H pretty much stopped thermal throttling when running CineBench R23 when I changed the thermal paste to Kryonaut Extreme.
- 5y ago
- bhouston 5y agoRegarding the displays. I use a dual screen setup on the mini (hdmi and display port) and it is perfect. So it is either a hardware issue in the cables, the mini or the monitor. I use currently use mono price 32 inch hdr monitors.
- bhouston 5y agoI would suggest swapping the monitor and the cables separately. I do think there is an issue with one of them.
- geerlingguy 5y agoI've tried two different (known-good) HDMI cables and only have the one DisplayPort cable (which works fine on the i9 MBP and even on my 13" MacBook Air)... it seems to be something funky with the mini only. At least with the DisplayPort cable, the dropouts don't happen, it's just annoying to have to manually turn off my monitor every time I walk away lest it go into the on/off/on/off cycle while the Mac is asleep. I did order a CableMatters USB-C to DisplayPort cable today to see if maybe going direct from the USB4->monitor will work better than TB3->CalDigit->DisplayPort->monitor.
- secondcoming 5y agoMan, I have huge DisplayPort issues when using my Dell 7750 with an external monitor. It can take a couple of reboots before it'll send a signal to it. The OS can see the monitor, but it just won't use it. It's incredibly annoying.
- bhouston 5y agoInteresting. I use a USB-C to DisplayPort cable. I've never run into a bad HDMI cable honestly. But I have run into bad DisplayPort cables a few times. I am unsure why that is.
- rsynnott 5y agoTheir DP problem sounds vaguely familiar; I'm almost certain I had the same thing years ago with a 2014 MBP. Can't remember what the fix was, though...
- 1_player 5y agoNote: 30% faster than a thermally challenged i9 on a MacBook Pro, not a desktop one. Given the comments on similar threads, I feel this needs to be mentioned.
- Bancakes 5y agoBeing thermally challenged is part of the design, huh...
- ajross 5y agoThis was a famously bad CPU/cooling design, actually. LOTS of people complained about it at the time. You can place blame on either party according to your personal affiliation, but similar Coffee Lake chips from other vendors with more robust (and, yes, louder) cooling designs were running rings around this particular MacBook.
- Traster 5y agoIt’s a problem of intels own making - marketing vastly different capabilities under the same brand in order to segment the market.
- frozenport 5y agoor Apple doing a bad job with the previous generation
- patmorgan23 5y agoOr both
- tedivm 5y agoThe 2019 macbook ironically had better heat dissipation than the previous generations, but it's still pretty bad. We can blame Apple for using chips that are too intense for their laptops, and we can blame Intel for making garbage chips that can't really perform in real world cases while spending a decade not bothering to innovate. Apple at least is moving away from Intel as a result of all of this, and I'm really impressed with how well the M1 transition has been going.
- OldTimeCoffee 5y agoHaving substantially more L1 and L2 cache per core but no L3 has to be a massive part of why the M1 performance is so good. I wonder if Intel/AMD have plans to increase the L1/L2 size on their next generations.
- amackera 5y agoCan you help me understand why removing L3 cache would speed things up? Genuinely curious! Increasing L1 and L2 make intuitive sense.
- jessermeyer 5y agoI think the idea is by removing L3 has allowed for an increase of both L1/2.
- lanna 5y agoI think he meant "despite not having L3"
- cogman10 5y agoRemoving L3 frees up transistors to be spent on L1/L2. On a modern processor the vast majority of transistors are spent on caches. Why this might help, ultimately, because the latency for getting something from L1 or L2 is a lot lower than the latency from L3 or main memory. That said, this could hurt multithreaded performance. L1/2 are used for 1 core in the system. L3 is shared by all the cores and a package. So if you have a bunch of threads working on the same set of data, having no L3 would mean doing more main memory fetches.
- vbezhenar 5y agoApple will invent L3 for workstation-level CPU.
- duskwuff 5y agoWild theory: for workstation-class systems, the 8/16 GB of on-package memory becomes "L3", and main memory can be expanded with standard DIMMs.
- out_of_protocol 5y agoCompiling stuff is not correct benchmark since end result is different - binary for arm vs binary for x86. Cross compiling is not good as well because one platform has disadvantage of compiling non-native code
- eyesee 5y agoIs there an advantage to compiling native vs non-native code? Certainly during execution I would expect that, but I’m not clear why that would be true for compilation. Agreed that a better benchmark would be compiling for the same target architecture on both.
- postalrat 5y agoMaybe you could cross compile on both systems and see if it actually does make a difference. I'm doubting it but don't have much to base that on.
- Someone 5y agoNon-native can be a bit harder for constant folding (you have to emulate the target’s behavior for floating point, for example), but I think that mostly is a thing of the past because most architectures use the same types. What can make a difference is the architecture. Examples: - Register assignment is easier on orthogonal architectures. - A compiler doesn’t need to spend time looking for auto-vectorization opportunities if the target architecture doesn’t have vector instructions. Probably more importantly, there can be a difference in how much effort the compiler makes for finding good code. Typically, newer compilers start out with worse code generation that is faster to generate (make it work first, then make it produce good code) I wouldn’t know whether any of these are an issue in this case.
- sp332 5y agoTrue but this is addressed in the article. If what you need is code that runs on a RPi, this is a meaningful comparison.
- deleted 5y ago[deleted]
- rubyist5eva 5y agoHow does a virtualized ARM build, of Ubuntu for example, run in Parallels vs. the same workload on an x86 virtual machine in the same range? If my day to day development workflow lives in linux virtual machines 90% of the time, is it worth it to get an M1 for virtualization performance? I realize I'm hijacking but I haven't found any good resources for this kind of information...
- xxpor 5y agoThis is very dependent on setup. If your IO is mostly done to SR-IOV devices, your perf will be very close to native anyway. The difference would be about the IOMMU (I have no idea if there's a significant difference between the two here). If devices are being emulated, the perf probably has more to do with the implementation of the devices than the platform itself.
- aduitsis 5y agoRegarding the point in the article mentioning the fans starting to spin at the drop of a hat: The macbook pro i9 16", albeit a fabulous device in almost every aspect, has a bug: Connecting an external monitor at QHD will send the discrete graphics card into >20W of power draw, whereas usually it's about 5W. At 20W for the graphics card alone, it's not difficult to see that the fans will be spinning perpetually.
- RicoElectrico 5y agoHuh. I have Dell Latitude 5501 and it's almost always in hairdryer mode when connected to the dock (on which there's 1920x1200 HP Z24i and 2560x1440 Dell U2515H). Your description seems suspiciously similar. Different graphics, though - MX150.
- tails4e 5y agoI've a Dell precision 5530 for work, absolutley roasting, continuously, even under no load. It's so bad, I'm switching to a mac book pro 16. Seems like out of the frying pan and into the fire for me!
- asdff 5y agoI wonder if anyone who prefers to dock their laptop has thought about sticking it in a mini freezer under their desk
- fpgaminer 5y ago> I know that 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 Is that true? If so, why? (I don't cross compile much, so it isn't something I've paid attention to). The architecture the compiler is running on doesn't change what the compiler is doing. It's not like the fact that it's running on ARM64 gives it some special powers to suddenly compile ARM64 instructions better. It's the same compiler code doing the same things and giving the same exact output.
- znpy 5y agothere's no reason for a cross-compiler to be slower than a native compiler. if your compiler binary is compiled for architecture A and emits code for an architecture B, it's going to perform the same as a compiler compiled for an architecture A and emitting code for the same architecture A.
- deleted 5y ago[deleted]
- cle 5y agoWell to get a little nuanced, it depends on if the backend for B is doing roughly the same stuff as for A (e.g. same optimizations?). I have no idea if that's generally true or not.
- karmakaze 5y agoWell there's one. If people tend to compile natively much more often than cross-compile, then it would make sense to spend time optimizing what benefits users.
- testific8 5y agoYes but you probably would make those optimizations in C code and not assembly. The amd64 compiler is basicially the same C code whether or not it's been bootstrapped on armv8 or amd64.
- 5y ago
- dathinab 5y agoFunny thing is the newest i7 from Intel (10nm) also might compile it noticeable faster then a i9 MacBook. There are very few if any Laptops out there which handle a i9 well. And Apple is kinda well known to not do a very good job when it comes to moving heat out of their Laptops. This is often blamed on Intel due to their CPU producing to much heat, but there are other Laptops which do handle this CPUs just fine... Anyway that doesn't change that Apples M1 are really good.
- smbv 5y agoMaybe speed it up even faster with distcc? https://distcc.github.io/ https://distcc.github.io/
- deleted 5y ago[deleted]
- hedgehog 5y agoFor anyone curious I timed the same build on a Ryzen 5800X (thanks Docker for making it easy). -j8 real 5m53.255s user 45m33.966s sys 4m19.954s -j16 real 4m31.947s user 63m36.096s sys 6m8.550s
- 1MachineElf 5y agoFor a while now I have been wondering what the times on a Ryzen 5800X would be. Thank you for sharing.
- kristianp 5y agoI tried my 10 year old desktop i7-3770, with -j8, 16 gig of RAM and 10 year old SSD: real 18m12.868s user 131m55.267s sys 11m29.005s
- nottorp 5y agoInteresting, it almost doesn't scale from 8 to 16. I mean yeah, it's 30% faster but user+sys is actually 40% higher.
- hedgehog 5y agoMakes sense for an 8-core CPU.
- peoplefromibiza 5y agoi7-6820HQ Skylake 2015 -j8 real 16m22.244s user 116m54.355s sys 9m23.599s After 6 years, using faster RAM and a much faster SSD, I honestly expected more than ~1.8 times faster compilation times from the M1. EDIT: all CPU issue mitigations were active, HT was disabled
- alpineidyll3 5y agoImagine if the processor wasn't proprietary how much faster it could be
- WantonQuantum 5y agoDo you have any justification for that claim? Seems to me that Apple has invested a lot in this line of processors over many years and have been in the position to use their own processors in their macs when Intel faltered. That's an enormous win for them. Where's the part where give away anything to their competitors in order to get faster processors?
- twobitshifter 5y agoI think they’re saying the build process could be improved if the M1 architecture were open. The build is not optimized for compilation on the M1.
- okamiueru 5y agoI'm a little bit confused why there are so many comparisons between M1 and older apple hardware. It seems like a weekly occurrence on HN. I think it's great that the M1 performs well. However, posts like these, and in general the comments I read, make me feel a bit uncomfortable. So, take this with a grain of salt, but I feel like there is a strong desire to confirm the idea that the M1 is a beast. This has been reinforced by quite a lot of misleading advertisement. So, personally, I like to work on a desktop computer. I don't care all that much about the power efficiency as I do about performance. So, I was curious, and ran the same test on a regular good top-end desktop hardware, and the same test took 2 minutes and 53 seconds. In other words 4.3x faster, or "78% faster" if using the same metric. Compared to the M1 time it would be 3.1x and 68% respectively. Just to be clear. This isn't a comment that "with my beefy computer I can outperform the M1". My desktop environment is not something I can commute with. My point is nothing more than, maybe to add some interesting data-points that I find are hard to come by. I seem to always see the M1 be compared to older apple hardware. Maybe that's all you wish to know. If MacOS is a must-have, then I suppose it doesn't really matter what else exists. And this is fine, I have no objection to it.
- fossuser 5y agoI think it’s hard to exclude power efficiency since that’s a constraint that matters for a lot of people and is particularly relevant on laptops. The other noticeable thing for me I think is driver related: instant wake, instant resolution change. It’s noticeably nicer to use. Is it faster than a desktop? No, but comparing it to a desktop feels like the weirder comparison to me.
- menomatter 5y agoSo for development in various ecosystems, would you say the M based is superior to Intel based in terms of efficiency and performance?
- okamiueru 5y agoI think I might have been misunderstood here. I sort of feared I would be, as I have some experience in this regard. I don't really have an opinion on what is nicer, and I also don't mind people liking their stuff, if anything it makes my happy to know. I also agree that it is weird to compare it to a desktop. In fact, my larger point is that I feel these benchmarks, and subsequent comment discussions, tend to imply this comparison. And, I don't see the harm in then showing what those numbers would be. If power consumption isn't important, I sure would like to know.
- menomatter 5y agoGenerally speaking, what is better if you value performance and energy efficient hardware? M or Intel based MacBook pro? Price wise Intel based machines seems to be more expensive.
- apetresc 5y agoEasily M, but wait a few more days and you might have an even better 15-inch M1 MBP to consider.
- Layke1123 5y agoThats because Intel needs to know what your compiling and adds all kinds of extras instructions and micro code hijinks to "trust" your software.
- blinkingled 5y agoGiven the state of Intel macOS of recent past it is not entirely impossible that Apple put in hardware specific optimization work into m1 macOS but ignored Intel one for whatever reasons. I mean he's compiling the Linux kernel inside of docker which runs on macOS Intel and M1. There's also hypervisor implementation involved - hardware and software. If he booted ARM Linux on M1 and compared the kernel compile there with one on Linux on Intel MBP it would be more apt. But then again Linux isn't optimized for the Mac especially for IO workloads due to AHCI / NVME driver issues - see phoronix. So yeah we will need a 8c Ryzen 5xxx mobile in Nuc form factor (PN50) vs Mac mini M1 benchmark when Linux is somewhat decent on that hardware.
- journey_16162 5y agoCan M1 Mac be used to cross-compile binaries for other platforms and systems (Windows, Linux) and would there be a performance gain over a beefy Linux/Windows laptop?
- nottorp 5y 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. I have the same problem with a 2018 (or 19? whichever's the latest) x86 Mac Mini connected over HDMI. Somehow I think Apple hasn't tested the Minis a lot with multiple monitors... or maybe with HDCP? Could be some HDCP renegotiation that you can't disable.
- thefz 5y agoOk, my home 3900x Compiles a 10-project VS2019 solution in about an eight of the time my half-decade old retail work computer. So?