1. 60

  2. 7

    I’m sad to see that this part of Rust development was killed due to Mozilla’s recent massive downsizing. Let’s hope that others pick it up, because the Rust compiler really needs more performance. It’s personally still keeping me away from Rust, as languages like Go prove that one can surpass C/C++ in compilation speeds by a wide margin.

    Admittedly, Rust does a lot of static analysis during compilation, but most of the bottleneck comes from the LLVM-backend, which does most of the work and is not very fast due to its generality and high workloads. It would be interesting to see how fast Rust would compile with a custom backend.

    1. 12

      rustc already has a second compiler backend using cranelift. It’s in flux, but measurement currently are looking good. https://github.com/bjorn3/rustc_codegen_cranelift/issues/133#issuecomment-439475172

      1. 3

        Does anyone know what’s happening to cranelift now that Mozilla has laid off the people who were working on it?

        1. 2

          I’m a little late to reply, but to answer your question: cranelift was moved to the bytecode alliance last year. I would not be surprised if those people start working at another alliance member.

          1. 1

            Cranelift is part of the bytecode alliance for a while now already and it’s doing rather fine, AFAIK.


        2. 10

          “Most of the bottleneck comes from LLVM” is broadly true but is an oversimplification, it can very much depend on the workload. I did some research a while back: https://wiki.alopex.li/WhereRustcSpendsItsTime

          1. 2

            That’s worthy of its own post to lobsters. I learned a bunch from this post.

            1. 5
              1. 4

                Thanks, but it’s been done ;-)