4 ms·
It's not written in the announcement, but I am under the impression that Rust 1.56 compiles a bit faster. Is that right ?
by Fiahil 5y ago
It's not written in the announcement, but I am under the impression that Rust 1.56 compiles a bit faster. Is that right ?
- benschulz 5y agoI believe this is mostly due to the switch to LLVM 13[1]. [1]: https://twitter.com/ryan_levick/status/1443202538099073027 https://twitter.com/ryan_levick/status/1443202538099073027
- eska 5y agoThat 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.
- woodruffw 5y agoPGO 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.
- nicoburns 5y agoI believe the new pass manager isn’t due to be enabled by default until the next version (1.57)
- runevault 5y agoYeah the significant improvements from 13 will require that last I heard.
- Macha 5y agoHere'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=ef9549b6c0efb7525c9b012148689c8d070f9bc0&end=0983094463497eec22d550dad25576a894687002 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.
- dralley 5y agoDoes anyone know what change was responsible for the big improvement from a few days ago? https://perf.rust-lang.org 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.
- kzrdude 5y agoFrom 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 https://github.com/rust-lang/rust/commit/63cc2bb > Enable new pass manager with LLVM 13 > https://github.com/rust-lang/rust/pull/88243 https://github.com/rust-lang/rust/pull/88243
- dralley 5y agoI'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.