The Rust compiler is still getting faster

  • The rust compiler now has features that few or none C and C++ compilers have: incremental compilation within a single translation unit, pipelined compilation, multi-threaded and lazy query-based compilation, ...

    Implementing each of these features have required whole program refactorings in a large-scale codebase performed by few individuals while hundreds of other developers where simultaneously evolving the software and implementing new features.

    Having been a C++ programmer for over 10 years, none of these refactorings would have payed off in C++ because of how time consuming it would have been to track all bugs introduced by them.

    Yet they do pay off in Rust because of my favourite Rust feature: the ability to refactor large-scale software without breaking anything: if a non-functional change compiles, "it works" for some definition of "works" that's much better than what most other languages give you (no memory unsafety, no data-races, no segfaults...).

    Very few programming languages have this feature, and no low-level programming language except for Rust has it.

    Software design is not an upfront-only task, and Rust let's you iterate on software design as you better understand the problem domain or the constraints and requirements change without having to rewrite things from scratch.

  • This is great! Many dev hours are spend waiting for the compiler, every second counts!

    The second order effects are even worse. After a minute, the programmer will start thinking about other things, running flow.

    If compiles regularly take 5min, devs will leave their desks (and honestly, who can blame them for it).

  • Faster compiler is nice, but you know what's faster? Not having to compile anything. I'm also looking forward to crates.io serving precompiled crates (https://www.ncameron.org/blog/cargo-in-2019/)

  • Does LLVM still take up much of the overall time spent by the Rust compiler? I was thinking of getting involved over there as the most effective way to make speed-ups happen.

  • I wish compiling the Rust compiler itself was faster. It literally takes days to compile on my old laptop.

  • Maybe they should make compiling the Rust compiler faster. Right now it takes longer and uses more CPU and memory than compiling a whole LLVM toolchain, then using that toolchain to compile a whole kernel and OS.

  • What is Rust good for, as opposed to Swift or Kotlin?

  • 1. make a really slow compiler

    2. slightly improve it over time

    3. write blogs about it

    4. win?

    How about releasing software with reasonable performance in the first place? This was just discussed yesterday that everyone prefers faster software.