Dandandan commented on issue #15631: URL: https://github.com/apache/datafusion/issues/15631#issuecomment-2796844672
Btw as a simple concept, I tested this yesterday to reduce execution time of short circuiting all false / all true cases by -25% compared to `true_count` / `false_count`: ```rust fn all_zero(array: &BooleanArray) -> bool { // TODO: nulls // match array.nulls() { // Some(nulls) => { // } // None => {} // } // platform specific let bit_chunks = array.values().bit_chunks(); let mut all_zero = true; for i in bit_chunks { all_zero &= i == 0; } all_zero } fn all_one(array: &BooleanArray) -> bool { // platform specific let bit_chunks = array.values().bit_chunks(); let mut all_one = true; for i in bit_chunks { all_one &= i == 0xFFFFFFFFFFFFFFFF; } all_one } ``` -- 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 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