Skip to content

Conversation

nnethercote
Copy link
Contributor

@nnethercote nnethercote commented Oct 13, 2025

Some minor cleanups I did while working on #147619.

r? @Zalathar

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

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Oct 13, 2025
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Oct 13, 2025
@rust-log-analyzer

This comment has been minimized.

@rust-bors
Copy link

rust-bors bot commented Oct 13, 2025

☀️ Try build successful (CI)
Build commit: c78dd25 (c78dd25d124432abe6198b931b6c3240950c2405, parent: 35456985fab3419baf4bf111b8bbbd5e8565615d)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (c78dd25): 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.4% [-0.5%, -0.4%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.4% [-0.5%, -0.4%] 2

Max RSS (memory usage)

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

Cycles

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

Binary size

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

Bootstrap: 474.753s -> 474.463s (-0.06%)
Artifact size: 388.13 MiB -> 388.08 MiB (-0.01%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Oct 13, 2025
@nnethercote nnethercote marked this pull request as ready for review October 14, 2025 00:14
@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 14, 2025
}

#[inline]
fn count_ones(words: &[Word]) -> usize {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this return a ChunkSize directly? It's mostly used to be cast.

Copy link
Contributor

Choose a reason for hiding this comment

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

If it returns ChunkSize directly, then it's only correct for slices no larger than a chunk, making it incorrect for DenseBitSet::count in the general case.

So if the return value is to be changed, it should be extracted to a separate function with a narrower name.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, there are some usize uses, so I'll leave it as is.

@cjgillot
Copy link
Contributor

r=me with or without the nit

@Zalathar
Copy link
Contributor

(r=me also)

@nnethercote
Copy link
Contributor Author

@bors r=cjgillot,Zalathar rollup

@bors
Copy link
Collaborator

bors commented Oct 14, 2025

📌 Commit 8386278 has been approved by cjgillot,Zalathar

It is now in the queue for this repository.

@bors bors 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 14, 2025
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 14, 2025
…illot,Zalathar

Bitset cleanups

Some minor cleanups I did while working on rust-lang#147619.

r? `@Zalathar`
bors added a commit that referenced this pull request Oct 14, 2025
Rollup of 7 pull requests

Successful merges:

 - #146187 (Unstably constify `ptr::drop_in_place` and related methods)
 - #146503 (std: improve handling of timed condition variable waits on macOS)
 - #147421 (Add check if span is from macro expansion)
 - #147630 (Bitset cleanups)
 - #147666 (Replace manual implementation with `carrying_mul_add`)
 - #147669 (fix missing link to `std::char` in `std` docs)
 - #147673 (pretty print u128 with display)

r? `@ghost`
`@rustbot` modify labels: rollup
jdonszelmann added a commit to jdonszelmann/rust that referenced this pull request Oct 14, 2025
…illot,Zalathar

Bitset cleanups

Some minor cleanups I did while working on rust-lang#147619.

r? `@Zalathar`
bors added a commit that referenced this pull request Oct 14, 2025
Rollup of 7 pull requests

Successful merges:

 - #146187 (Unstably constify `ptr::drop_in_place` and related methods)
 - #146503 (std: improve handling of timed condition variable waits on macOS)
 - #147421 (Add check if span is from macro expansion)
 - #147630 (Bitset cleanups)
 - #147666 (Replace manual implementation with `carrying_mul_add`)
 - #147669 (fix missing link to `std::char` in `std` docs)
 - #147673 (pretty print u128 with display)

r? `@ghost`
`@rustbot` modify labels: rollup
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 14, 2025
…illot,Zalathar

Bitset cleanups

Some minor cleanups I did while working on rust-lang#147619.

r? ``@Zalathar``
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Oct 14, 2025
…illot,Zalathar

Bitset cleanups

Some minor cleanups I did while working on rust-lang#147619.

r? ```@Zalathar```
bors added a commit that referenced this pull request Oct 14, 2025
Rollup of 12 pull requests

Successful merges:

 - #146187 (Unstably constify `ptr::drop_in_place` and related methods)
 - #146503 (std: improve handling of timed condition variable waits on macOS)
 - #147526 (Move computation of allocator shim contents to cg_ssa)
 - #147630 (Bitset cleanups)
 - #147638 (bpf: return results larger than one register indirectly)
 - #147666 (Replace manual implementation with `carrying_mul_add`)
 - #147669 (fix missing link to `std::char` in `std` docs)
 - #147673 (pretty print u128 with display)
 - #147677 (Fewer exceptions in `span()` on parsed attributes)
 - #147680 (Fix ICE caused by associated_item_def_ids on wrong type in resolve diag)
 - #147682 (convert `rustc_main` to the new attribute parsing infrastructure)
 - #147683 (only check duplicates on old/unparsed attributes)

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

7 participants