-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Add a !=
check to ChunkedBitSet::union
.
#147619
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Add a `!=` check to `ChunkedBitSet::union`.
This comment has been minimized.
This comment has been minimized.
For future work, we could hypothetically get even more clever, and try to start the But that might not be worth the extra implementation complexity (or might even reduce the benefit of the equality check). |
Finished benchmarking commit (701ca72): comparison URL. Overall result: ✅ improvements - no action neededBenchmarking 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 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 2.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary -3.3%, secondary 2.7%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 472.507s -> 474.412s (0.40%) |
Interesting idea! I tried it out, with code like this: let i = match iter::zip(
&self_chunk_words[0..num_words],
&other_chunk_words[0..num_words],
)
.position(|(a, b)| a != b)
{
Some(i) => i,
None => continue, // all elements equal, nothing more to do
};
let op = |a, b| a | b;
if !bitwise_changes(
&self_chunk_words[i..num_words],
&other_chunk_words[i..num_words],
op,
) {
continue;
}
// ... do the mutation ... And it ended up being a significant slowdown. I think because that |
For less indentation, mostly.
It's a big speed win for cranelift-codegen-0.119.0.
b1eb8e1
to
ad8b2e0
Compare
I have update the code a little to include some refactoring. |
Looks good, thanks! @bors r+ |
The job Click to see the possible cause of the failure (guessed by this bot)
|
…illot,Zalathar Bitset cleanups Some minor cleanups I did while working on rust-lang#147619. r? `@Zalathar`
…illot,Zalathar Bitset cleanups Some minor cleanups I did while working on rust-lang#147619. r? `@Zalathar`
…illot,Zalathar Bitset cleanups Some minor cleanups I did while working on rust-lang#147619. r? ``@Zalathar``
…illot,Zalathar Bitset cleanups Some minor cleanups I did while working on rust-lang#147619. r? ```@Zalathar```
It's a big speed win for
cranelift-codegen-0.119.0
.r? @Zalathar