logoalt Hacker News

pie_flavoryesterday at 6:11 PM6 repliesview on HN

I am a longtime Windows user and it brings me absolutely no joy to report that the M4 I am forced to use for work runs the Rust compiler a good bit faster than the big fancy gaming PC I just got with a 9800X3D.


Replies

satvikpendemyesterday at 8:05 PM

Rust literally compiles ~4x faster on WSL than on the Windows command line, on the same hardware, so try that and see. Also set up the mold or wild linker as well as sccache, although sccache is OS agnostic so you can use it on macOS too. Make sure your code is on the WSL side not on /mnt/c which is the Windows side though, that will kill compilation speed.

https://www.reddit.com/r/rust/s/CsEy9bLivK

show 2 replies
rstat1yesterday at 6:37 PM

I'd wager that's more likely due to Windows than the hardware. Like sure the hardware does play a part in that but its not the whole story or even most of it.

My C++ projects have a python heavy build system attached where the main script that runs to prepare everything and kick off the build, takes significantly longer to run on Windows than Linux on the same hardware.

show 1 reply
thewebguydyesterday at 7:03 PM

Try adding your working directory to the exclusions for windows defender, or creating a Dev Drive instead in settings (will create a separate partition, or VHD using ReFS and exclude it from Windows defender). Should give it a bit of a boost.

everfrustratedyesterday at 8:09 PM

Apple buries this info but the memory bandwidth on the M series is very high. Doubly and triply so for the Pro & Max variants which are insanely high.

Not much in the PC line up comes close and certainly not at the same price point. There's some correlation here between PCs still wanting to use user-upgradable memory which can't work at the higher bandwidths vs Apple integrating it into the cpu package.

show 1 reply
0x457yesterday at 7:00 PM

That's most likely because windows indexes and scans files rustc produces. My linux machines demolish my iMac in rust compilation.

show 1 reply
teaearlgraycoldyesterday at 10:37 PM

You’re running Windows unironically?