‹ BackHN Continuity

Thread

How to speed up the Rust compiler in September 2026

279 points · 171 comments · trickypr

  1. Surac · · focus · HN ↗
    Why is the compiler slow in the first place? I have no rust knowledge, how slow us slow, lets say in comparison to a c compiler?

    What is the performance killer?

    1. thevinter · · focus · HN ↗
      First of all, the fact that the article talks about "speeding up" the rust compiler doesn't automatically mean that the compiler is "slow"[0].

      Now, is rustc slower than e.g. clang? by how much? why?

      Those are different (and complicated) questions. It really depends on what you're compiling, but I'd say rustc can be 1-5x slower (maybe more at times?).

      The reasons are many and varied, but in general rust compilation is slower because the compiler is doing way more things compared to C (monomorphization, complex trait resolution + type inference, borrow checker..)

      [0]: Also I'd argue that "slow" without a concrete point of reference is a meaningless term in this context.

      1. Joker_vD · · focus · HN ↗
        > the fact that the article talks about "speeding up" the rust compiler doesn't automatically mean that the compiler is "slow"

        Well, if it weren't "slow" for some definition of "slow", nobody would bother speeding it up, would they?

        1. bryanlarsen · · focus · HN ↗
          The go compiler is considered fast, yet Google spends effort speeding up the go compiler. Not to the same extent, but Google has a lot of go code, so it does make a difference.
Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.