psvri commented on PR #2591:
URL: https://github.com/apache/arrow-rs/pull/2591#issuecomment-1227613710

   I actually tried that.
   
   There were a lot of if else paths in the kernels. It would mean I would have 
to pick one of the below options
   
   - write a function which would create a closure based on the pattern. This 
lead to some very ugly code with Fn's being wrapped in boxes. So I didn't 
prefer that.
   - Next option is to wrap the if else options inside the closure , but this 
would mean a comparison would happen for each element which wasn't optimal.
   - The next option was to use ArrayAccessor and compare_op inside each if 
else. But that is as good as in lineing the function our self. Hence I went 
with this approach.
   
   Let me know your thoughts here.


-- 
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