Skip to content

Add a single-entry parent SpanData cache - #163628

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
nnethercote:SourceSpanCache
Oct 3, 2026
Merged

rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
nnethercote:SourceSpanCache

Conversation

@nnethercote

Copy link
Copy Markdown
Contributor

For use in encoding, decoding, and stable hashing. It's a decent performance win on a number of benchmarks.

r? @oli-obk

For use in encoding, decoding, and stable hashing. It's a decent
performance win on a number of benchmarks.
@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Oct 2, 2026
@nnethercote

Copy link
Copy Markdown
Contributor Author

LLM disclosure: the idea for this came from an LLM. I wrote all the code and text myself.

@nnethercote

Copy link
Copy Markdown
Contributor Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Oct 2, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Oct 2, 2026
Add a single-entry parent `SpanData` cache
@rust-bors

rust-bors Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: c1ea28c (c1ea28c6c87385ed20846dbdebf16f06813f7d34)
Base parent: c36f145 (c36f1457196e315bc204b9564a6a5a7fe7f5a51f)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (c1ea28c): comparison URL.

Overall result: ✅ improvements - no action needed

Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf.

@bors rollup=never rustc-perf
@rustbot label: -S-waiting-on-perf -perf-regression

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% [-2.4%, -0.1%] 139
Improvements ✅
(secondary)
-0.8% [-4.4%, -0.1%] 109
All ❌✅ (primary) -0.4% [-2.4%, -0.1%] 139

Max RSS (memory usage)

Results (primary 3.0%, secondary -4.3%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
3.0% [3.0%, 3.0%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-4.3% [-4.3%, -4.3%] 1
All ❌✅ (primary) 3.0% [3.0%, 3.0%] 1

Cycles

Results (secondary 1.8%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
3.7% [2.2%, 6.5%] 4
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.9% [-2.1%, -1.6%] 2
All ❌✅ (primary) - - 0

Binary size

This perf run didn't have relevant results for this metric.

Bootstrap: 489.203s -> 491.876s (0.55%)
Artifact size: 406.46 MiB -> 406.49 MiB (0.01%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Oct 2, 2026
@nnethercote
nnethercote marked this pull request as ready for review October 2, 2026 06:42
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 2, 2026
@nnethercote

Copy link
Copy Markdown
Contributor Author

Lots of green for incremental builds, as expected.

@oli-obk oli-obk left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors r+

neat! makes sense

View changes since this review

@rust-bors

rust-bors Bot commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 5e04ccd has been approved by oli-obk

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 2, 2026
@rust-bors

This comment has been minimized.

@rust-bors rust-bors Bot added merged-by-bors This PR was explicitly merged by bors. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 3, 2026
@rust-bors

rust-bors Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

☀️ Test successful - CI
Approved by: oli-obk
Duration: 3h 4m 54s
Pushing e0452e2 to main...

@rust-bors
rust-bors Bot merged commit e0452e2 into rust-lang:main Oct 3, 2026
16 checks passed
@rustbot rustbot added this to the 1.101.0 milestone Oct 3, 2026
@github-actions

github-actions Bot commented Oct 3, 2026

Copy link
Copy Markdown
Contributor
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 0abfedb (parent) -> e0452e2 (this PR)

Test differences

Show 4 test diffs

4 doctest diffs were found. These are ignored, as they are noisy.

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard e0452e266c9a4d6522507318f8365741f0b12d29 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. test-x86_64-rust-for-linux: 38m 49s -> 1h 1m (+57.2%)
  2. dist-arm-linux-musl: 1h 56m -> 1h 7m (-42.0%)
  3. test-i686-msvc: 2h 30m -> 1h 32m (-38.4%)
  4. test-x86_64-gnu-parallel-frontend: 1h 32m -> 2h 6m (+37.5%)
  5. test-x86_64-gnu-debug: 2h 13m -> 1h 24m (-37.0%)
  6. dist-x86_64-msvc: 3h 5m -> 1h 59m (-35.6%)
  7. test-x86_64-gnu-tools: 1h 11m -> 45m 46s (-35.5%)
  8. test-armhf-gnu: 1h 33m -> 1h 2m (-33.7%)
  9. dist-x86_64-msvc-alt: 2h 52m -> 1h 55m (-33.1%)
  10. dist-s390x-linux: 1h 33m -> 1h 4m (-31.6%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (e0452e2): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

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% [-2.4%, -0.1%] 152
Improvements ✅
(secondary)
-0.7% [-4.4%, -0.1%] 111
All ❌✅ (primary) -0.4% [-2.4%, -0.1%] 152

Max RSS (memory usage)

Results (secondary -1.3%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
3.2% [2.6%, 3.9%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-3.9% [-6.4%, -1.9%] 5
All ❌✅ (primary) - - 0

Cycles

Results (secondary -1.0%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
3.2% [2.3%, 3.8%] 3
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-4.2% [-10.0%, -2.1%] 4
All ❌✅ (primary) - - 0

Binary size

This perf run didn't have relevant results for this metric.

Bootstrap: 492.59s -> 491.518s (-0.22%)
Artifact size: 409.38 MiB -> 408.68 MiB (-0.17%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merged-by-bors This PR was explicitly merged by bors. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants