2021-09-01 Triage Log

A very busy week with relatively even amounts of regressions and improvements (albeit with improvements outweighing regressions). The largest win was the use of profile-guided optimization (PGO) builds on x86_64 linux builds which brings fairly large improvements in real-world crates. There were 2 regressions that caused fairly large (~3.5%) regressions in real-world crates which need to be investigated.

Triage done by @rylev. Revision range: 33fdb797f59421c7bbecaa4588ed5d7a31a9494a..fe37929e4cba2c5c21e6805805769630c736bc3d

5 Regressions, 4 Improvements, 5 Mixed; 0 of them in rollups 56 comparisons made in total

Regressions

Get piece unchecked in write #83302

  • Large regression in instruction counts (up to 3.5% on incr-patched: b9b3e592dd cherry picked builds of style-servo)
  • This is a largely a change in std lib code, and we don't really have a good process for dealing with how std lib changes effect performance.
  • This seems to be primarily affecting debug and check builds, but there doesn't seem to be a query that is clearly to blame here. Given the motivation of this PR is primarily performance, I think it deserves a closer look.
  • Added a comment on the PR here.

Warn about unreachable code following an expression with an uninhabited type #85556

  • Very large regression in instruction counts (up to 9.0% on incr-unchanged builds of webrender-wrench)
  • This regression seems to only be happening in one benchmark webrender-wrench and is consistently affecting the extern_crate, incr_comp_intern_dep_graph_node, and metadata_decode_entry_extern_crate queries.
  • Given the nature of the change which only impacts liveness checking, I'm unsure why this might be the case. However, given that the regressions are fairly large, I do think additional investigation is worth looking into.
  • Left a comment on the PR here.

lazily “compute” anon const default substs #87280

  • Large regression in instruction counts (up to 4.8% on full builds of ctfe-stress-4)
  • This is an important change for const generics, and the const generics team discussed whether the performance hit seemed worth it, and they reached this conclusion that it was.

Treat types in unnormalized function signatures as well-formed #88312

  • Large regression in instruction counts (up to 3.4% on full builds of serde)
  • This regression affects many real world crates in significant ways. The query affected by this seems to be additional calls to implied_outlives_bounds which I believe would be impacted by this change.
  • Left a comment on the PR here.

build llvm libunwind.a in rustbuild #85600

  • Small regression in instruction counts (up to 0.3% on incr-patched: println builds of regression-31157)
  • The performance change is rather small, but quite surprising since the change is just in how linunwind is being build which (presumably?) should mean that this is a perf noop.
  • Left a comment on the PR here, but noted that it didn't seem strictly necessary to investigate due to the rather small impact of the performance change.

Improvements

PGO for LLVM builds on x86_64-unknown-linux-gnu in CI #88069

  • Very large improvement in instruction counts (up to -6.4% on incr-patched: b9b3e592dd cherry picked builds of style-servo)

Morph layout_raw query into layout_of. #88308

  • Very large improvement in instruction counts (up to -12.2% on incr-full builds of ctfe-stress-4)

Introduce ~const #88328

  • Moderate improvement in instruction counts (up to -0.8% on incr-unchanged builds of derive)

Cow'ify some pprust methods #88262

  • Moderate improvement in instruction counts (up to -0.6% on incr-patched: println builds of html5ever)

Don't use guess_head_span in predicates_of for foreign span #88414

  • Large improvement in instruction counts (up to -2.2% on incr-unchanged builds of unify-linearly)

Mixed

Normalize projections under binders #85499

  • Very large improvement in instruction counts (up to -36.8% on incr-unchanged builds of deeply-nested-async)
  • Small regression in instruction counts (up to 1.4% on incr-patched: add static arr item builds of coercions)
  • The large wins are in the deeply-nested-async benchmark which due to being a stress test can often have big swings in performance.
  • A perf run was run on the PR, and it was not labeled as a mixed result because of slightly different thresholds that were used back then.
  • The PR is a pretty important one and the perf results are largely neutral so need to ping the authors here.

Use undef for uninitialized bytes in constants #83698

  • Very large improvement in instruction counts (up to -10.3% on full builds of ctfe-stress-4)
  • Small regression in instruction counts (up to 0.6% on incr-patched: println builds of coercions)
  • Largely a performance win albeit in ctf-stress-test which being a stress test can yield large changes in certain cases.
  • The regressions here are all very small, and overall despite this being technically a mixed result, the improvements outweigh the regressions.

#[inline] non-generic pub fns in rustc_target::abi and ty::layout. #88326

  • Small improvement in instruction counts (up to -1.5% on incr-patched: add static arr item builds of coercions)
  • Very small regression in instruction counts (up to 0.3% on full builds of ripgrep)
  • The PR author already noticed that this ended up being a bit of a wash in terms of performance. Given that improvements still outweigh regressions, there's no need to look into this (though I imagine the author will continue to do so).

Treat macros as HIR items #88019

  • Large improvement in instruction counts (up to -3.2% on incr-unchanged builds of tuple-stress)
  • Moderate regression in instruction counts (up to 0.8% on incr-unchanged builds of wg-grammar)
  • The improvements here outweigh the regressions considerably, and this is a fairly important bug fix. This PR has already had its performance justified.

Untriaged Pull Requests