You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2020/09/22 01:06:12 UTC

[GitHub] [arrow] jacques-n edited a comment on pull request #8214: ARROW-9965: [Java] Improve performance of BaseFixedWidthVector.setSafe by optimizing capacity calculations

jacques-n edited a comment on pull request #8214:
URL: https://github.com/apache/arrow/pull/8214#issuecomment-696459730


   > I think there are two opportunities here - simply optimizing setSafe, which can be done by either specializing for the power-of-two size where possible, or by caching sizes (option 1/option 3); and considering a separate builder API that can also provide performance improvements, which I think can be considered separately.
   > 
   > As for whether to cache sizes (option 3) or optimize for power-of-two lengths only, I would prefer to cache sizes as it's more general and as shown here, faster in microbenchmarks. However there could ecosystem code that expects to be able to reallocate buffers manually - if so, this would be a breaking change, and so I'd rather take the smaller/guaranteed win.
   > 
   > (Option 4 is essentially inlining an optimized builder API into the benchmark, no?)
   
   I'm clearly missing something. Why doesn't item 2 when directly in the vector solve the same purpose as 1/3?


----------------------------------------------------------------
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:
users@infra.apache.org