Dandandan commented on issue #15631: URL: https://github.com/apache/datafusion/issues/15631#issuecomment-2786711757
Would be good to compare it with a boolean version of this as well, like this, to see if it vectorizes better: ``` pub fn all_zero(&self) -> bool { // platform specific const LANES: usize = 8; let mut chunks = self.chunks.chunks_exact(LANES); let mut all_false = true; chunks.borrow_mut().for_each(|chunk| { let chunk: [u64; LANES] = chunk.try_into().unwrap(); for i in 0..LANES { all_false &= chunk[i] == 0; } }); let remainder = chunks.remainder(); for chunk in remainder { all_false &= *chunk == 0; } all_false } ``` -- 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