tustvold commented on issue #3999:
URL: https://github.com/apache/arrow-rs/issues/3999#issuecomment-1493974485

   > I'm not sure if such trait-based dispatch could bring performance penalty 
even it is slight
   
   Trait-based dispatch is zero-cost, and behaves the same as normal function 
dispatch. Trait-object dispatch, i.e. using `dyn` is not zero-cost, however, it 
is unavoidable if you don't know the types statically. TLDR it should be no 
different than currently, and for cases where the static types are known, it 
will be faster
   
   > special needs for computation
   
   Yes, we will need to keep an eye out for this. I'm optimistic we can get by 
with traits for the type of operation, i.e. Divide, Add, Substract, etc... with 
checked and unchecked member functions. Divide might need a third for divide by 
zero => NULL, but that is perfectly fine imo


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