3 ms·
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
by pie_flavor 8mo ago
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.
- rstat1 8mo agoI'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.
- m_mueller 8mo agoAfaik a lot of it is ntfs. It’s just so slow with lots of small files. Compare unzipping moderately large source repos on windows vs. POSIX, it’s day and night.
- p_ing 8mo agoNo, it’s not NTFS, it’s the file system filter architecture of the NT kernel.
- mattbee 8mo agoI had internalised that it was Windows Defender hooking every file operation and checking it against a blacklist? I've had it forced off for years.
- p_ing 8mo agoWindows Defender is a file system filter which you cannot disable. You may have others (but they're fortunately rare, now). All that said, you cannot disable the architecture, i.e. bypass the file system filter code.
- rstat1 8mo agoYou can with Dev Drives now apparently, which don't use NTFS and disable ALL the filter drivers (including the Defender one) I stopped using Windows just as these were added so now I'm curious if there's any actual performance benefit to using the.
- p_ing 8mo agoNo, they don't disable the Windows Defender filter, they put it in async mode.
- zer0zzz 8mo agoThis guy gets it. Yes bingo. It's the VFS' filters/ACLs support afaik.
- PaulHoule 8mo agoJust deleting 40,000 files from the node_modules of a modest Javascript project can thoroughly hammer NTFS.
- fluoridation 8mo agoI think part of that is Explorer, rather than NTFS. Try doing it from the console instead. rd /q /s <dir>.
- PaulHoule 8mo agoIt still takes a lot longer than Linux or Mac OS X.
- fluoridation 8mo agoNTFS is definitely slower to modify file system structures than ext4.
- PaulHoule 8mo agoA big part of it is that NT has to check with the security manager service every time it does a file operation. The original WSL for instance was a very NT answer to the problem of Linux compatibility: NT already had a personality that looked like Windows 95, just make one that looks like Linux. It worked great with the exception of the slow file operations which I think was seen as a crisis over Redmond because many software developers couldn’t or wouldn’t use WSL because of the slow file operations affecting many build systems. So we got the rather ugly WSL2 which uses a real Linux filesystem so the files perform like files on Linux.
- fluoridation 8mo agoI don't know about ugly. Virtualization seems like a more elegant solution to the problem, as I see it. Though it also makes WSL pointless; I don't get why people use it instead of just using Hyper-V.
- 0x457 8mo agoThat's most likely because windows indexes and scans files rustc produces. My linux machines demolish my iMac in rust compilation.
- thewebguyd 8mo agoTry 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.
- satvikpendem 8mo agoRust 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 https://www.reddit.com/r/rust/s/CsEy9bLivK
- fluoridation 8mo agoThat has not been my experience at all; I get pretty much the same times on the same machine on Linux and Windows. Something weird has happening to that person. Someone mentioned Defender, and that could certainly be it, as I have it totally disabled (forcibly, by deleting the executable).
- michaelcampbell 8mo agoAt least 10 years ago, some IBM tools I was forced to use worked faster in a linux VM on Windows (through VirtualBox) than on Windows.
- zer0zzz 8mo agoWSL is the best way to avoid all the Windows slowness as far as the VFS and the forking overhead.
- endymion-light 8mo agoWSL is fantastic - apart from the fact that you need to clear it intermittently via disk compression. I use it for work and it's great until you get something incredibly frustrating, like needing a pass-through for your hardware. The one thing I can say with my macbook as someone who's switched from a decade of windows, is that stuff tends to just work, minus window swithcing.
- natpalmer1776 8mo agoThis is why I stopped using Windows. You shouldn't have to go through all these extra steps just to squeeze out the same performance you would get by just installing [Other OS]. At some point I realized I was spending hours at a time trying to 'fix' Windows and decided to give Mac a try right around the time that Apple Silicon came out. It was a night and day difference.
- everfrustrated 8mo agoApple 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.
- chocochunks 8mo agoThey don't bury it. It's literally on the spec page these days. And LPCAMM2 falls somewhere between the base M and Pro CPUs while still being replaceable. The new MacBook Neo is a less than half the memory bandwidth of the base model MacBook Air.
- teaearlgraycold 8mo agoYou’re running Windows unironically?
- zer0zzz 8mo agoThis shouldn't be surprising. macOS has a faster filesystem+VFS than Windows, and the single thread perf of the M4 beats most PC cpus. I'm not sure what linker rust uses, but the apple native ld64/ldPrime is also pretty fast as far as linkers go. Windows is also slow enough at forking, that clang has "in-process CC1" mode because of it.