etseidl commented on PR #6252:
URL: https://github.com/apache/arrow-rs/pull/6252#issuecomment-2302413118

   > Also thank you to @tustvold and @jhorstmann for your comments and review 
leading to this change.
   
   Yes, thank you all for taking the time to teach 🙏 
   
   > As I understand the underlying mechanism for the speedup is that you have 
removed a branch from the inner loop while converting data (by not treating 
"null" slots any differently). This is quite clever and as a bonus it makes the 
code more concise.
   
   Yes, this was part 2 of the optimization, with the first part being skipping 
reconstruction of the nulls buffer. As I understand the docs for 
[`unary`](https://github.com/apache/arrow-rs/blob/1dae743af5f6fbea2e3effe7a453df8ef55b7f2a/arrow-array/src/array/primitive_array.rs#L809)
 by not branching in the inner loop the compiler can better optimize the 
translation logic.
   
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to