by maccard · 3y ago · 0 comments
My first clone on symbolicator took the same length of time on my windows machine. Even with your numbers, 4 minutes to build what is not a particularly large project is bonkers. I
My experience across a wide range of C++ projects and wide range of Rust projects is that they’re roughly comparable in terms of compilation speed. Rust macros can do bad things very quickly. Same as C++ templates.
Meanwhile I have some CUDA targets that take over 5 minutes to compile a single file.
I feel like if Rust got a super fast incremental linker it’d be in a pretty decent place.
[0] https://www.cpubenchmark.net/cpu.php?cpu=AMD+Ryzen+Threadrip...
I don't think that's true at all, unless you're using a very personal definition of "common".
In the real world, teams use compiler cache systems like ccache and distributed compilers like distcc to share the load through cheap clusters of COTS hardware or even vCPUs. But even that isn't "common".
Once you add CICD pipelines, you recognize that your claim doesn't hold water.
(Even most MBPs are unaffordable for a large set of developers.)
I don't think it's as accessible to average C++ or Rust developers as you expect.
Rust also does significantly more for you at compile time than C++ does, so I don't mind the compiler taking some not time to do it
Why do you need to build hundreds of dependencies if you're not touching them?
Also, I've spent a _lot_ of time with Unreal and the build system. Unreal uses an "adaptive unity" that pulls changed files out of what's compiled every time. Our incremental single file builds are sub-10-seconds most of the time.
Ccache works, but if you use the Visual Studio C++ compiler you need to configure your build to be cacheable.