alamb opened a new issue, #15631:
URL: https://github.com/apache/datafusion/issues/15631

   ### Is your feature request related to a problem or challenge?
   
   @acking-you 's wonderful PR https://github.com/apache/datafusion/pull/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
   
   
![Image](https://github.com/user-attachments/assets/4f5216b6-683f-414e-9c91-203d670c0149)
   
   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 
   https://github.com/apache/datafusion/pull/15462#issuecomment-2784190060
   
   ### 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
   
   ```shell
   cargo bench --profile=profiling  --bench binary_op
   ```
   
   And then profile that with your favorite tool 
   
   For example, you can use samply like this:
   ```shell
   samply record   target/profiling/deps/binary_op-cce23ddc74cdfa3a --bench
   ```
   
   ### Additional context
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org
For additional commands, e-mail: github-h...@datafusion.apache.org

Reply via email to