Skip to content

Commit 00df41b

Browse files
committed
Summarize compile time improvements
1 parent 3a0a313 commit 00df41b

File tree

1 file changed

+6
-37
lines changed

1 file changed

+6
-37
lines changed

_posts/2017-05-15-rust-at-two-years.md

Lines changed: 6 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -253,43 +253,12 @@ Try out incremental compilation on nightly Rust with
253253
[roadmap-4]: https://github.com/rust-lang/rust-roadmap/issues/4
254254
[incrcomp-svg]: /images/2017-05-Second-Birthday/incremental-compilation.svg
255255

256-
The progress that's happened in the last year on improving the time it takes to
257-
do a full compilation is mostly slow and steady, with a few pathological cases
258-
greatly improved Below is a table of [benchmarks] comparing the time it takes
259-
to compile a few crates and tests with Rust 1.8.0 (the stable release a year
260-
ago) to Rust 1.17.0 (the stable release today). On average, compile times have
261-
improved by 5-10%, but some worst-case behavior has been fixed that results
262-
in >95% improvements in certain programs. A couple of crates did show a slight
263-
regression of 1-15% in compile times, but in most cases it's a win. The
264-
helloworld crate saw a 110% increase in compile time, but it only equates to
265-
+0.1 second, which is probably a small fixed overhead that gets overwhelmed in
266-
any larger project.
267-
268-
| Benchmark | 1.8.0 (time) | 1.8.0 ([rss]) | 1.17.0 (time) | 1.17.0 ([rss]) | % change (time) | % change ([rss]) |
269-
|----------------------|--------------|---------------|---------------|----------------|-----------------|------------------|
270-
| helloworld | 0.09s | 78MB | 0.19s | 83MB | 111.1% | 6.4% |
271-
| rust-encoding 0.3.0 | 2.21s | 239MB | 1.91s | 163MB | -13.6% | -31.8% |
272-
| regex 0.1.30 | 2.49s | 169MB | 2.86s | 178MB | 14.9% | 5.3% |
273-
| inflate 0.1.0 | 4.60s | 134MB | 4.06s | 141MB | -11.7% | 5.2% |
274-
| tuple-stress | 4.62s | 260MB | 4.67s | 363MB | 1.1% | 39.6% |
275-
| html5ever 2016-08-25 | 5.16s | 234MB | 3.98s | 228MB | -22.9% | -2.6% |
276-
| hyper 0.5.0 | 5.97s | 248MB | 5.44s | 234MB | -8.9% | -5.6 % |
277-
| jld-day15-parser | 42.38s | 204MB | 1.38s | 111MB | -96.7% | -45.6% |
278-
279-
In graph form:
280-
281-
![Bar graph showing compilation time data from the table][compilation-time]{:class="center"}
282-
283-
[compilation-time]: /images/2017-05-Second-Birthday/compilation-time.png
284-
285-
*Thanks to Mark Simulacrum for gathering this benchmark data and Simon Heath
286-
for analyzing it!*
287-
288-
Check out [perf.rust-lang.org] for monitoring Rust's performance day-to-day.
289-
As you can see, we've still got more work to do!
290-
291-
[benchmarks]: https://github.com/rust-lang-nursery/rustc-benchmarks
292-
[rss]: https://en.wikipedia.org/wiki/Resident_set_size
256+
We've also made some progress on the time it takes to do a full compilation. On
257+
average, compile times have improved by 5-10% in the last year, but some
258+
worst-case behavior has been fixed that results in >95% improvements in certain
259+
programs. Some very promising improvements are on the way for later this year;
260+
check out [perf.rust-lang.org] for monitoring Rust's performance day-to-day.
261+
293262
[perf.rust-lang.org]: http://perf.rust-lang.org/
294263

295264
### [Rust should provide a basic, but solid IDE experience](https://github.com/rust-lang/rust-roadmap/issues/2)

0 commit comments

Comments
 (0)