Hacker News new | past | comments | ask | show | jobs | submit login

It's not written in the announcement, but I am under the impression that Rust 1.56 compiles a bit faster. Is that right ?



Here's some compile benchmarks from the LLVM update which is the main reason for compile time changes:

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

Some things compile decently faster (~ 10%), some things compile a little faster or slower (~ +/- 3%), some things have a bigger perf hit but not as many as had a bigger perf gain (~ -10%).

So it's faster on average but the data is muddy enough that you probably wouldn't stick it front and center on your release notes.


Does anyone know what change was responsible for the big improvement from a few days ago?

https://perf.rust-lang.org

It's less of a universal improvement than the pass manager, but for most of the benchmarks that it does impact it seems just as large, or larger.


From the graph, it points out this commit. And from the description, I think it's exactly that commit and not just one close to it. I heard it was a big improvement.

https://github.com/rust-lang/rust/commit/63cc2bb

> Enable new pass manager with LLVM 13

> https://github.com/rust-lang/rust/pull/88243


I'm talking about the change on the 17th of October, only a couple of days ago, not the one from a month ago which I know (and mentioned) is the new pass manager. The change doesn't show up in all of the graphs, but for the cases where it does show, it's a similar size improvement to the new pass manager.

Maybe it was enabling PGO rather than any code change, I've heard it mentioned that happened recently.


I believe this is mostly due to the switch to LLVM 13[1].

[1]: https://twitter.com/ryan_levick/status/1443202538099073027


I believe the new pass manager isn’t due to be enabled by default until the next version (1.57)


Yeah the significant improvements from 13 will require that last I heard.


That seems to have been a mixed bag. But they also enabled PGO (or was it LTO?) and that was mentioned to be a bigger improvement.


PGO requires a runtime profile, so I doubt they've enabled that by default :-)

Rust has had LTO for quite a while, and it's normally a source of longer compilation times rather than shorter ones (since LTO in LLVM-world involves mashing all of the bitcode together and (re-)running a lot of expensive analyses to further optimize across translation unit boundaries.

OTOH they've been making continuous improvements to the incremental compilation mode since 1.51/2, so that's probably among the sources of improvements here.


They're referring to the use of PGO when building the compiler itself: https://github.com/rust-lang/rust/pull/88069


TIL. That's fantastic!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: