Need help?
<- Back

Comments (44)

  • cogman10
    I was curious to figure out exactly why the new trait solver was needed.Apparently it's easier to work with and more correct. Future type system changes are blocked on it. These 2 in particular were called out as being blocked by the new trait solver [1][1] https://goals.rust-lang.org/2026/rtn.html
  • cbarrick
    Nit: "et cetera" is two words.It is a latin phrase that literally translates to "and the rest." "Et" means "and," and "cetera" means "the rest."This is a great article! Apologies for being pedantic. I'm just noting this fun fact here in case the author is checking this thread.
  • eosis
    Awesome work, seems an odyssey.I think there is a little error in the code snippets near the caching section start where it claims variables are swapped but they are not? Though maybe I have just misunderstood something.
  • AlotOfReading
    It's interesting how much of the next gen compiler improves borrow heavily from logic programming. I don't know if any other compilers that have made the connection to logic programming as explicit as rustc.
  • ozgrakkurt
    Rust compilation is impossible to solve for some reason.I have a 4k line project that depends on serde-json, xxhash, crossbeam and rand.It takes several seconds to compile in release mode.This is insane compared to my 20k line project in C++ which compiles everything and runs all tests in 0.7 seconds.The C++ project doesn't depend on libc or any external libraries but that is not a practical option in rust.I tried bunch of different options and actually removed some dependencies but it seems like it is not possible to get the rust program to compile fast.Does anyone know why it is this slow comparatively?
  • Game_Ender
    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...
  • deltaforage
    I have a rust genomics pipeline where I was seeing a 3 minute “incremental” build that was entirely spent on trait resolution. I did some -Zself-profile analysis and saw the type checker spending >50% of its time re-deriving the same set of obligations over and over (due to a single blanket impl with a stack of associated type). I wasn’t sure if the problem was that it was missing a memoization cache or that it was just searching poorly.This is a great way to describe the “lazy” nature of the new solver.Are there any benchmarks that include pathological cases of blanket implementations? (It is easy to run into this if you are writing generic numeric code – as I do for a living in bioinformatics)
  • xiaogui917
    [dead]
  • essfrmexistence
    Did it made it more faster or efficient?