The compiler, measured on itself

The self-hosted compiler front+middle end processing its own complete source (289918 chars), run under the Stage 0 interpreter while building this page:

  • tokenize: 52197 tokens in 4470 ms
  • parse: 102 top-level statements in 1350 ms
  • lower: 101 functions in 10778 ms
  • codegen: 1622189 chars of Rust in 7828 ms

The natively compiled compiler (patc1) runs the same front end roughly two orders of magnitude faster; rustc then dominates end-to-end compile time.