Skip to content

Store chunk_domain_size explicitly in Chunk.#147802

Open
nnethercote wants to merge 1 commit intorust-lang:mainfrom
nnethercote:chunk_domain_size
Open

Store chunk_domain_size explicitly in Chunk.#147802
nnethercote wants to merge 1 commit intorust-lang:mainfrom
nnethercote:chunk_domain_size

Conversation

@nnethercote
Copy link
Copy Markdown
Contributor

@nnethercote nnethercote commented Oct 17, 2025

View all comments

Currently we compute it on demand, but it's a little simpler and slightly faster to store it.

r? @ghost

@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 17, 2025
@nnethercote
Copy link
Copy Markdown
Contributor Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Oct 17, 2025
Store `chunk_domain_size` explicitly in `Chunk`.
@rust-bors

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Oct 17, 2025
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Oct 17, 2025

☀️ Try build successful (CI)
Build commit: f2dee36 (f2dee36bae6b48e996359e187e06284c26c6d3fb, parent: 28c4c7d7abced7b35c49f38149b9cb6ea27dd2a6)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (f2dee36): comparison URL.

Overall result: ✅ improvements - no action needed

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.

@bors rollup=never
@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.9% [-1.3%, -0.5%] 4
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.9% [-1.3%, -0.5%] 4

Max RSS (memory usage)

Results (secondary 3.9%)

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.9% [3.9%, 3.9%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Cycles

Results (secondary 2.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)
2.8% [2.8%, 2.8%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 474.3s -> 474.199s (-0.02%)
Artifact size: 390.30 MiB -> 390.38 MiB (0.02%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Oct 17, 2025
@cjgillot
Copy link
Copy Markdown
Contributor

Haha I removed it 2 months ago... #145480

@nnethercote
Copy link
Copy Markdown
Contributor Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

rust-bors bot pushed a commit that referenced this pull request Mar 8, 2026
Store `chunk_domain_size` explicitly in `Chunk`.
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Mar 8, 2026
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Mar 9, 2026

☀️ Try build successful (CI)
Build commit: 3292998 (3292998ac4db5a85e367e401dd12f438b3ce18c3, parent: b41f22de2a13a0babd28771e96feef4c309f54aa)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (3292998): comparison URL.

Overall result: ✅ improvements - no action needed

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.

@bors rollup=never
@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.7% [-1.2%, -0.1%] 4
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.7% [-1.2%, -0.1%] 4

Max RSS (memory usage)

Results (primary 1.3%)

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

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

Cycles

Results (primary 3.1%, secondary 2.4%)

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

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

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 478.517s -> 480.21s (0.35%)
Artifact size: 395.02 MiB -> 396.97 MiB (0.49%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Mar 9, 2026
@nnethercote
Copy link
Copy Markdown
Contributor Author

@cjgillot: going back is a small perf win on cranelift, and the code is bit more concise too. What do you think?

@nnethercote nnethercote marked this pull request as ready for review March 11, 2026 06:32
@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 Mar 11, 2026
@rust-bors

This comment has been minimized.

@wesleywiser
Copy link
Copy Markdown
Member

r? rust-lang/compiler

@Mark-Simulacrum
Copy link
Copy Markdown
Member

Since I reviewed #145480, probably might as well look at this. r? Mark-Simulacrum

@rustbot rustbot assigned Mark-Simulacrum and unassigned adwinwhite Apr 3, 2026
@nnethercote
Copy link
Copy Markdown
Contributor Author

nnethercote commented Apr 3, 2026

FWIW, the context here is that I wrote the original code, and then it was modified (without my knowledge), and then I was looking at it much later and thought "hmm, it seems like it would be better like this" and I managed to perfectly undo the modification and revert it to the original form without realizing. So, points for consistency if nothing else?

@Mark-Simulacrum
Copy link
Copy Markdown
Member

r=me with a rebase (and optionally a clean perf run), since perf is slightly positive. But I don't have a strong opinion over whether to store this or not from a code quality perspective.

Maybe worth adding a comment to the field noting that we've chosen to keep it for now, linking the ~3 involved PRs?

@Mark-Simulacrum Mark-Simulacrum added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 4, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 7, 2026

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@nnethercote
Copy link
Copy Markdown
Contributor Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

rust-bors bot pushed a commit that referenced this pull request Apr 7, 2026
Store `chunk_domain_size` explicitly in `Chunk`.
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Apr 7, 2026
@rust-log-analyzer

This comment has been minimized.

Currently we compute it on demand, but it's a little simpler and
slightly faster to store it.
@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors bot commented Apr 7, 2026

☀️ Try build successful (CI)
Build commit: bd78cbb (bd78cbb7e34d44cad00846b8f105b56cc2de5222, parent: bcded331651b60a0383b3ff51db4f24c4495ac53)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (bd78cbb): comparison URL.

Overall result: ✅ improvements - no action needed

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.

@bors rollup=never
@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.8% [-1.2%, -0.4%] 4
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.8% [-1.2%, -0.4%] 4

Max RSS (memory usage)

Results (secondary -5.1%)

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)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-5.1% [-5.1%, -5.1%] 1
All ❌✅ (primary) - - 0

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 486.041s -> 487.115s (0.22%)
Artifact size: 395.29 MiB -> 395.25 MiB (-0.01%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Apr 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants