Comment by satvikpendem
9 hours ago
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.
That 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).
At 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.