Unofficial Hacker News companion — get notified on comment replies, and more.

Optimizing Rustc's next trait solver (opens external site)

213 points by g0xA52A2A 8 days ago | donsz.nl | 48 comments on HN | Vote on HN (opens Hacker News) |

View full thread · View on Hacker News

Comment thread (2)

  1. The article is great but actually lacks data on overall performance. It looks like the big focus was handling pathological performance cases, which they have done a great job on. Overall though this looks like a mild performance regression (~6%) for the compiler based on an October test [0]

    I like that Rust is principled about correctness, but as a mostly moved on long suffering C++ developer it’s disappointing the replacement suffers from the same poor compilation performance. At least rust has a culture of tracking and working on perf even if philosophically the community puts it low down their list.

    0 - https://perf.rust-lang.org/compare.html?start=b5427502dab50c...

    Replies (1)
    1. This is still work in progress, to be fair. Those results are already outdated, a number of optimizations landed since then. It'll probably take a bit more time to close the gap, but we expect the final result to be mostly similar to the old solver or faster. I'll also caveat that our benchmark suite is skewed towards pathological cases (when it comes to the type system code), so it doesn't necessarily indicate performance on average program.