Key active queries by usize rather than storing raw keys
Starting with perf run to evaluate impact -- my hope is that this helps somewhat with rustc compile times, since it should allow de-duplicating a bunch of HashTable<K, ...> codegen since it's now ~always HashTable<usize, ...> -- more can be done by merging the DefaultCache's active + non-active maps too.
Locally I don't really see any win from this though, so it's possible it's wasted effort -- want to see what perf says about it.
r? ghost
@bors2 try @rust-timer queue
Awaiting bors try build completion.
@rustbot label: +S-waiting-on-perf
:hourglass: Trying commit ebd893aadf85b76cc9dea19c988073c82ca582fe with merge 93ff34b07bb0247a95e138d0468874536d5aab1e…
To cancel the try build, run the command @bors2 try cancel.
The job x86_64-gnu-llvm-19 failed! Check out the build log: (web) (plain)
Click to see the possible cause of the failure (guessed by this bot)
#19 exporting to docker image format
#19 sending tarball 27.5s done
#19 DONE 35.0s
##[endgroup]
Setting extra environment values for docker: --env ENABLE_GCC_CODEGEN=1 --env GCC_EXEC_PREFIX=/usr/lib/gcc/
[CI_JOB_NAME=x86_64-gnu-llvm-19]
[CI_JOB_NAME=x86_64-gnu-llvm-19]
debug: `DISABLE_CI_RUSTC_IF_INCOMPATIBLE` configured.
---
sccache: Listening on address 127.0.0.1:4226
##[group]Configure the build
configure: processing command line
configure:
configure: build.configure-args := ['--build=x86_64-unknown-linux-gnu', '--llvm-root=/usr/lib/llvm-19', '--enable-llvm-link-shared', '--set', 'rust.randomize-layout=true', '--set', 'rust.thin-lto-import-instr-limit=10', '--set', 'build.print-step-timings', '--enable-verbose-tests', '--set', 'build.metrics', '--enable-verbose-configure', '--enable-sccache', '--disable-manage-submodules', '--enable-locked-deps', '--enable-cargo-native-static', '--set', 'rust.codegen-units-std=1', '--set', 'dist.compression-profile=balanced', '--dist-compression-formats=xz', '--set', 'rust.lld=false', '--disable-dist-src', '--release-channel=nightly', '--enable-debug-assertions', '--enable-overflow-checks', '--enable-llvm-assertions', '--set', 'rust.verify-llvm-ir', '--set', 'rust.codegen-backends=llvm,cranelift,gcc', '--set', 'llvm.static-libstdcpp', '--set', 'gcc.download-ci-gcc=true', '--enable-new-symbol-mangling']
configure: build.build := x86_64-unknown-linux-gnu
configure: target.x86_64-unknown-linux-gnu.llvm-config := /usr/lib/llvm-19/bin/llvm-config
configure: llvm.link-shared := True
configure: rust.randomize-layout := True
configure: rust.thin-lto-import-instr-limit := 10
:sunny: Try build successful (CI)
Build commit: 93ff34b07bb0247a95e138d0468874536d5aab1e (93ff34b07bb0247a95e138d0468874536d5aab1e)
Queued 93ff34b07bb0247a95e138d0468874536d5aab1e with parent c6768de2d63de7a41124a0fb8fc78f9e26111c01, future comparison URL. There are currently 5 preceding artifacts in the queue. It will probably take at least ~7.6 hours until the benchmark run finishes.
Finished benchmarking commit (93ff34b07bb0247a95e138d0468874536d5aab1e): comparison URL.
Overall result: ❌ regressions - BENCHMARK(S) FAILED
Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.
Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with @rustbot label: +perf-regression-triaged. If not, please fix the regressions and do another perf run. If its results are neutral or positive, the label will be automatically removed.
@bors rollup=never @rustbot label: -S-waiting-on-perf +perf-regression
:exclamation: :exclamation: :exclamation: :exclamation: :exclamation: Warning :warning:: The following benchmark(s) failed to build:
- serde-1.0.219-threads4
:exclamation: :exclamation: :exclamation: :exclamation: :exclamation:
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.7% | [0.1%, 4.6%] | 66 |
| Regressions ❌ (secondary) |
2.0% | [0.1%, 4.7%] | 43 |
| Improvements ✅ (primary) |
- | - | 0 |
| Improvements ✅ (secondary) |
-0.8% | [-0.9%, -0.5%] | 3 |
| All ❌✅ (primary) | 0.7% | [0.1%, 4.6%] | 66 |
Max RSS (memory usage)
Results (primary 1.2%, secondary 1.6%)
A less reliable metric. May be of interest, but not used to determine the overall result above.
| mean | range | count | |
|---|---|---|---|
| Regressions ❌ (primary) |
1.2% | [1.0%, 1.4%] | 3 |
| Regressions ❌ (secondary) |
2.2% | [1.3%, 3.2%] | 7 |
| Improvements ✅ (primary) |
- | - | 0 |
| Improvements ✅ (secondary) |
-2.5% | [-2.5%, -2.5%] | 1 |
| All ❌✅ (primary) | 1.2% | [1.0%, 1.4%] | 3 |
Cycles
Results (primary 2.7%, secondary 4.1%)
A less reliable metric. May be of interest, but not used to determine the overall result above.
| mean | range | count | |
|---|---|---|---|
| Regressions ❌ (primary) |
2.7% | [1.0%, 5.0%] | 14 |
| Regressions ❌ (secondary) |
4.5% | [2.0%, 7.7%] | 20 |
| Improvements ✅ (primary) |
- | - | 0 |
| Improvements ✅ (secondary) |
-4.3% | [-4.3%, -4.3%] | 1 |
| All ❌✅ (primary) | 2.7% | [1.0%, 5.0%] | 14 |
Binary size
This benchmark run did not return any relevant results for this metric.
Bootstrap: 755.17s -> 752.359s (-0.37%) Artifact size: 372.30 MiB -> 371.93 MiB (-0.10%)