Repository navigation
Rollup of 5 perf-sensitive pull requests - #164931
Conversation
This avoids needing the overhead of a call before discovering that the `Cow` is already owned.
These show up in hot paths, and inlining should allow optimizing them.
These are simple wrappers but nonetheless don't get inlined and show up in hot paths.
These are simple wrappers.
…Simulacrum Add various `#[inline]` annotations for simple functions on hot paths that don't get inlined All of these are simple, likely to be optimizable once inlined into their caller, and found on hot paths in profiles (I used `clap_derive` for the profiling) as non-inlined functions.
…=hanna-kruppe Don't emit allow attributes in try/contract desugaring
…rouwer,nnethercote create fast path for attributes created in builtin macro expansions Emitting attributes in rustc_builtin_macros involves creating an `ast::Attribute` and token trees, just to parse that into a parsed attribute almost immediately. This PR sidesteps that by creating a new `ast::Attribute` variant that does not do this. I've taken care to only do this for the derive and test macros, so that they never re-enter the parser. This results in some moderate performance gains. It'll also take away almost all of the regressions in rust-lang#164217 (comment) (see rust-lang#164281 (comment) for a perf run of this and that PR stacked) r? @nnethercote
…r=beetrees Deduplicate DefId encodings in the query cache I used a similar approach for DefId encoding and decoding, based on the existing Symbol encoder and decoder. https://github.com/rust-lang/rust/blob/81900216ce9ee0b48f2c563c696bfca98cfba755/compiler/rustc_middle/src/query/on_disk_cache.rs#L818 https://github.com/rust-lang/rust/blob/81900216ce9ee0b48f2c563c696bfca98cfba755/compiler/rustc_middle/src/query/on_disk_cache.rs#L447
Revert "rustc_codegen_gcc subtree update" Reverts rust-lang#164869 because it broke main again See rust-lang#164921 (comment) See discussion in [#t-infra > Tree ops @ 💬](https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/Tree.20ops/near/634790354)
|
@bors r+ p=5 force |
This comment has been minimized.
This comment has been minimized.
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing 7d0f9b4 (parent) -> 76456a6 (this PR) Test differencesShow 54 test diffs54 doctest diffs were found. These are ignored, as they are noisy. Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 76456a688bc0ed897fa23a677d4ddb5b3fdb575a --output-dir test-dashboardAnd then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
|
📌 Perf builds for each rolled up PR:
parent commit: 7d0f9b4ec5 In the case of a perf regression, run the following command with the SHAs of each PR you suspect might be the cause: |
|
Finished benchmarking commit (76456a6): comparison URL. Overall result: ❌✅ regressions and improvements - please read:Our benchmarks found a performance regression caused by this PR. Next Steps:
@rustbot label: +perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary -1.3%, secondary -1.6%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary -2.1%, secondary -0.3%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary -1.2%, secondary -0.6%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 490.188s -> 489.982s (-0.04%) |
|
@rust-timer triage all |
Running triage with 42 benchmarksTriage only executes the benchmarks on rollup members, that were changed significantly on the rollup.
#163845 06a58da Add various
|
| mean | range | count | |
|---|---|---|---|
| Regressions ❌ (primary) |
0.8% | [0.4%, 2.0%] | 5 |
| Regressions ❌ (secondary) |
0.3% | [0.2%, 0.4%] | 4 |
| Improvements ✅ (primary) |
-2.1% | [-12.8%, -0.2%] | 19 |
| Improvements ✅ (secondary) |
-1.4% | [-3.4%, -0.3%] | 3 |
| All ❌✅ (primary) | -1.5% | [-12.8%, 2.0%] | 24 |
Max RSS (memory usage)
Results (primary 0.3%, secondary 0.0%)
A less reliable metric. May be of interest, but not used to determine the overall result above.
| mean | range | count | |
|---|---|---|---|
| Regressions ❌ (primary) |
0.8% | [0.4%, 1.5%] | 16 |
| Regressions ❌ (secondary) |
0.7% | [0.6%, 0.9%] | 3 |
| Improvements ✅ (primary) |
-1.6% | [-3.3%, -0.9%] | 4 |
| Improvements ✅ (secondary) |
-2.1% | [-2.1%, -2.1%] | 1 |
| All ❌✅ (primary) | 0.3% | [-3.3%, 1.5%] | 20 |
Cycles
Results (primary -2.1%, secondary -0.5%)
A less reliable metric. May be of interest, but not used to determine the overall result above.
| mean | range | count | |
|---|---|---|---|
| Regressions ❌ (primary) |
1.2% | [0.6%, 2.9%] | 4 |
| Regressions ❌ (secondary) |
1.3% | [0.7%, 2.2%] | 3 |
| Improvements ✅ (primary) |
-3.2% | [-13.5%, -0.4%] | 13 |
| Improvements ✅ (secondary) |
-1.6% | [-3.3%, -0.5%] | 5 |
| All ❌✅ (primary) | -2.1% | [-13.5%, 2.9%] | 17 |
Binary size
Results (primary -1.2%, secondary -0.6%)
A less reliable metric. May be of interest, but not used to determine the overall result above.
| mean | range | count | |
|---|---|---|---|
| Regressions ❌ (primary) |
2.5% | [2.5%, 2.5%] | 1 |
| Regressions ❌ (secondary) |
- | - | 0 |
| Improvements ✅ (primary) |
-1.3% | [-2.7%, -0.1%] | 38 |
| Improvements ✅ (secondary) |
-0.6% | [-1.1%, -0.1%] | 9 |
| All ❌✅ (primary) | -1.2% | [-2.7%, 2.5%] | 39 |
#164122 eeff8b4 Don't emit allow attributes in try/contract desugaring
Instruction count
Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
| mean | range | count | |
|---|---|---|---|
| Regressions ❌ (primary) |
- | - | 0 |
| Regressions ❌ (secondary) |
0.1% | [0.1%, 0.1%] | 1 |
| Improvements ✅ (primary) |
-0.7% | [-1.9%, -0.1%] | 103 |
| Improvements ✅ (secondary) |
-0.4% | [-0.6%, -0.1%] | 23 |
| All ❌✅ (primary) | -0.7% | [-1.9%, -0.1%] | 103 |
Max RSS (memory usage)
Results (primary 0.1%, secondary 0.4%)
A less reliable metric. May be of interest, but not used to determine the overall result above.
| mean | range | count | |
|---|---|---|---|
| Regressions ❌ (primary) |
1.0% | [0.5%, 1.7%] | 13 |
| Regressions ❌ (secondary) |
0.7% | [0.5%, 1.2%] | 7 |
| Improvements ✅ (primary) |
-1.1% | [-3.3%, -0.5%] | 10 |
| Improvements ✅ (secondary) |
-1.4% | [-1.4%, -1.4%] | 1 |
| All ❌✅ (primary) | 0.1% | [-3.3%, 1.7%] | 23 |
Cycles
Results (primary -0.9%, secondary 1.4%)
A less reliable metric. May be of interest, but not used to determine the overall result above.
| mean | range | count | |
|---|---|---|---|
| Regressions ❌ (primary) |
0.8% | [0.4%, 1.1%] | 4 |
| Regressions ❌ (secondary) |
2.2% | [0.6%, 5.1%] | 5 |
| Improvements ✅ (primary) |
-1.2% | [-3.2%, -0.4%] | 20 |
| Improvements ✅ (secondary) |
-0.5% | [-0.5%, -0.4%] | 2 |
| All ❌✅ (primary) | -0.9% | [-3.2%, 1.1%] | 24 |
Binary size
This perf run didn't have relevant results for this metric.
#164260 5d7c38d create fast path for attributes created in builtin macro expansions
Instruction count
Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
| mean | range | count | |
|---|---|---|---|
| Regressions ❌ (primary) |
- | - | 0 |
| Regressions ❌ (secondary) |
- | - | 0 |
| Improvements ✅ (primary) |
-0.4% | [-1.3%, -0.1%] | 76 |
| Improvements ✅ (secondary) |
-1.3% | [-3.9%, -0.2%] | 26 |
| All ❌✅ (primary) | -0.4% | [-1.3%, -0.1%] | 76 |
Max RSS (memory usage)
Results (primary 0.4%, secondary 1.1%)
A less reliable metric. May be of interest, but not used to determine the overall result above.
| mean | range | count | |
|---|---|---|---|
| Regressions ❌ (primary) |
0.9% | [0.4%, 2.0%] | 12 |
| Regressions ❌ (secondary) |
1.3% | [0.5%, 4.2%] | 8 |
| Improvements ✅ (primary) |
-1.3% | [-2.9%, -0.5%] | 4 |
| Improvements ✅ (secondary) |
-0.7% | [-0.7%, -0.7%] | 1 |
| All ❌✅ (primary) | 0.4% | [-2.9%, 2.0%] | 16 |
Cycles
Results (primary -0.6%, secondary -1.9%)
A less reliable metric. May be of interest, but not used to determine the overall result above.
| mean | range | count | |
|---|---|---|---|
| Regressions ❌ (primary) |
0.5% | [0.4%, 0.5%] | 5 |
| Regressions ❌ (secondary) |
1.2% | [0.5%, 2.7%] | 4 |
| Improvements ✅ (primary) |
-1.0% | [-2.1%, -0.4%] | 17 |
| Improvements ✅ (secondary) |
-3.6% | [-6.8%, -0.5%] | 7 |
| All ❌✅ (primary) | -0.6% | [-2.1%, 0.5%] | 22 |
Binary size
This perf run didn't have relevant results for this metric.
#164300 69cf161 Deduplicate DefId encodings in the query cache
Instruction count
Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
| mean | range | count | |
|---|---|---|---|
| Regressions ❌ (primary) |
0.8% | [0.1%, 1.6%] | 149 |
| Regressions ❌ (secondary) |
0.7% | [0.1%, 2.2%] | 81 |
| Improvements ✅ (primary) |
- | - | 0 |
| Improvements ✅ (secondary) |
- | - | 0 |
| All ❌✅ (primary) | 0.8% | [0.1%, 1.6%] | 149 |
Max RSS (memory usage)
Results (primary -1.1%, secondary -2.2%)
A less reliable metric. May be of interest, but not used to determine the overall result above.
| mean | range | count | |
|---|---|---|---|
| Regressions ❌ (primary) |
0.9% | [0.4%, 1.8%] | 10 |
| Regressions ❌ (secondary) |
0.8% | [0.4%, 1.6%] | 4 |
| Improvements ✅ (primary) |
-1.7% | [-6.5%, -0.5%] | 37 |
| Improvements ✅ (secondary) |
-3.4% | [-5.2%, -0.9%] | 10 |
| All ❌✅ (primary) | -1.1% | [-6.5%, 1.8%] | 47 |
Cycles
Results (primary 0.0%, secondary 0.8%)
A less reliable metric. May be of interest, but not used to determine the overall result above.
| mean | range | count | |
|---|---|---|---|
| Regressions ❌ (primary) |
0.8% | [0.5%, 1.2%] | 8 |
| Regressions ❌ (secondary) |
1.5% | [1.0%, 2.4%] | 4 |
| Improvements ✅ (primary) |
-0.9% | [-2.2%, -0.4%] | 7 |
| Improvements ✅ (secondary) |
-0.6% | [-0.7%, -0.5%] | 2 |
| All ❌✅ (primary) | 0.0% | [-2.2%, 1.2%] | 15 |
Binary size
This perf run didn't have relevant results for this metric.
#164929 359bf16 Revert "rustc_codegen_gcc subtree update"
Queued 359bf16 with parent 7d0f9b4, future comparison URL.
There are currently 15 preceding artifacts in the queue.
It will probably take at least ~5.9 hours until the benchmark run finishes.
Successful merges:
#[inline]annotations for simple functions on hot paths that don't get inlined #163845 (Add various#[inline]annotations for simple functions on hot paths that don't get inlined)Failed merges:
LintLevelsBuilder::addintoadd_astandadd_hir#164790 (SplitLintLevelsBuilder::addintoadd_astandadd_hir)r? @ghost
Create a similar rollup