2021-01-20 Triage Log

A busy week with more performance gains than regressions. These changes included one very large perf gain and one very large perf regression in stress test benchmarks that seem to only produce mild perf changes in real world use cases.

Triage done by @rylev. Revision range: b6b461652a9bebfb4ddabcae896ee7237cf0962a..e05409a02c6e73a3dea6da98798468db2910ca59

3 Regressions, 5 Improvements, 4 Mixed 2 of them in rollups

Regressions

Use tcx.symbol_name when determining clashing extern declarations. #80009

Update cargo #80974

  • Large regression in instruction counts (up to 5.2% on incr-unchanged builds of token-stream-stress-opt)
  • Purely an update of Cargo. Not sure why this is causing issues.

implement ptr::write without dedicated intrinsic #80290

  • Small regression in instruction counts (up to 1.2% on full builds of regex-debug)
  • Small regex-debug full builds regression specifically in the LLVM_module_codegen_emit_obj query. This largely affects debug builds due to this previously being an instrinsic but now requiring LLVM to optimize it to its previously efficient form.
  • An idea for gaining the performance back can be found here

Improvements

Turn type inhabitedness into a query to fix exhaustive_patterns perf #79670

  • Very large improvement in instruction counts (up to -22.6% on full builds of match-stress-exhaustive_patterns-check)
  • Large wins in the match stress test. Up to 22% and nearly 86% in the check_match query.

Reintroduce hir::ExprKind::If #79328

  • Moderate improvement in instruction counts (up to -3.1% on incr-full builds of clap-rs-check)

Use probe-stack=inline-asm in LLVM 11+ #77885

  • Moderate improvement in instruction counts (up to -2.1% on incr-unchanged builds of cargo-check)

Try to avoid locals when cloning into Box/Rc/Arc #80824

  • Small improvement in instruction counts (up to -1.3% on incr-patched: b9b3e592dd cherry picked builds of style-servo-debug)

BTreeMap: convert search functions to methods #81159

Mixed

Make CTFE able to check for UB... #78407

  • Very large regression in instruction counts (up to 191.2% on full builds of ctfe-stress-4-check)
  • Moderate improvement in instruction counts (up to -4.4% on full builds of many-assoc-items-check)
  • Unfortunately, the regressions outweigh the improvements considerably though the regressions are in the stress test for const eval which this change directly impacts, particularly the eval_to_allocation_raw query.
  • These regressions were determined necessary and seem to only dramatically impact stress benchmarks while sometimes leading to perf gains in real world use cases.

Rollup of 10 pull requests #80960

  • Very large regression in instruction counts (up to 87.7% on incr-patched: sparse set builds of regex-debug)
  • Large improvement in instruction counts (up to -5.8% on incr-patched: u8 3072 builds of issue-46449-debug)
  • Perf losses seem to be coming from LLVM codegen which leads me to believe that #80796 is possibly to blame. A perf test has been kicked off.

Rollup of 13 pull requests #81113

  • Large improvement in instruction counts (up to -6.1% on incr-unchanged builds of webrender-check)
  • Large regression in instruction counts (up to 5.8% on incr-unchanged builds of deep-vector-check)
  • Hard to tell which PR is responsible though it seems like the regressions are largely coming in the expand_crate query. Best guesss might be #80031.

Remove PredicateKind and instead only use Binder #80679

  • Moderate regression in instruction counts (up to 3.3% on full builds of deeply-nested-async-check)
  • Moderate improvement in instruction counts (up to -2.0% on incr-full builds of deeply-nested-async-debug)
  • Largely reverts the performance changes (both regressions and gains) from #73503.

Nags requiring follow up