Closed
Description
One of the hottest functions in rustc is tdefl_compress
, which is called from deflate_bytes
. It's used in two places: crate metadata in rlibs, and LLVM bytecode files.
If we simply turned off compression in these two places we would get sizeable speed-ups. The following numbers are for a proof-of-concept patch, doing debug builds with a stage1 compiler.
futures-rs-test 4.632s vs 4.588s --> 1.009x faster (variance: 1.013x, 1.012x)
helloworld 0.249s vs 0.250s --> 0.997x faster (variance: 1.014x, 1.015x)
html5ever-2016- 7.967s vs 7.791s --> 1.023x faster (variance: 1.004x, 1.016x)
hyper.0.5.0 5.424s vs 5.177s --> 1.048x faster (variance: 1.004x, 1.006x)
inflate-0.1.0 5.013s vs 4.945s --> 1.014x faster (variance: 1.009x, 1.017x)
issue-32062-equ 0.367s vs 0.364s --> 1.008x faster (variance: 1.013x, 1.017x)
issue-32278-big 1.812s vs 1.810s --> 1.001x faster (variance: 1.007x, 1.008x)
jld-day15-parse 1.638s vs 1.606s --> 1.020x faster (variance: 1.001x, 1.012x)
piston-image-0. 12.522s vs 12.236s --> 1.023x faster (variance: 1.029x, 1.004x)
regex.0.1.30 2.684s vs 2.511s --> 1.069x faster (variance: 1.018x, 1.013x)
rust-encoding-0 2.232s vs 2.134s --> 1.046x faster (variance: 1.008x, 1.010x)
syntex-0.42.2 34.353s vs 33.205s --> 1.035x faster (variance: 1.011x, 1.013x)
syntex-0.42.2-i 18.848s vs 17.033s --> 1.107x faster (variance: 1.004x, 1.035x)
regex
and syntex-incr
are the biggest wins.
The obvious downside is that the size of the relevant files is larger. So we need to decide if this we are happy with this trade-off, accepting larger files for faster compilation.
Metadata
Metadata
Assignees
Labels
No labels