maartenbreddels commented on pull request #7357:
URL: https://github.com/apache/arrow/pull/7357#issuecomment-642472363


   > I expect that we cannot pre-allocate and thus these are the things where 
we could continue to as-is.
   
   Yeah, it's a bit tricky, but there are lots of options that would require 
some benchmarking I think. In most cases starting with a buffer of the same 
length should work, a buffer of 4*bufferlength would always work, but might 
waste memory, or require a realloc. The buffer can also grow dynamically 
(that's what I do in vaex, it grows by 2x when too small), but different 
algorithms may need different strategies. For instance, in upper/lower algos, 
growing by 20% each time the buffer is too small sounds.
   
   Also, making the algorithms SIMD optimizable (by the compiler) is another 
thing to think about. So I agree, having a few (diverse) functions first would 
make sense to have in.
   


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

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


Reply via email to