-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem or challenge?
@acking-you 's wonderful PR #15462 adds short circuiting to boolean operation evaluation which makes evaluating some complex expressions much faster.
However, to do so it uses the count_ones
function to check
We have theorized it should be faster to simply check if there are any set bits in the array rather than using count_zeros, however @acking-you found that this is not easy to do as Rust generates very optimized code for count_ones
You can see an example of this analysis
#15462 (comment)
Describe the solution you'd like
Now that we have benchmarks for binary_op it would be great to see if we can optimize this codepath more
Describe alternatives you've considered
Roughly speaking you can run the benchmarks with
cargo bench --profile=profiling --bench binary_op
And then profile that with your favorite tool
For example, you can use samply like this:
samply record target/profiling/deps/binary_op-cce23ddc74cdfa3a --bench
Additional context
No response
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request