You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "alamb (via GitHub)" <gi...@apache.org> on 2023/02/18 13:46:03 UTC
[GitHub] [arrow-datafusion] alamb commented on issue #5325: Optimize Accumulator `size` function performance
alamb commented on issue #5325:
URL: https://github.com/apache/arrow-datafusion/issues/5325#issuecomment-1435672826
Thank you @comphead
I think this would be relatively straightforward to implement for the common case (the one in this code) of fixed size values
Basically instead of looping over all scalar values to count their sizes (`vec.iter()`) we could special case by type for fixed size types
https://github.com/apache/arrow-datafusion/blob/c5108aef4d2660cce950976af14d33444f27075e/datafusion/common/src/scalar.rs#L2367-L2374
Instead add some code that checks "if is ScalarType::Int8, UInt8, etc then size = size[0]*vec.len()"
This would be a good first issue I think -- a good result and straightforward implementation
--
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-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org