[ https://issues.apache.org/jira/browse/ARROW-5705?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Micah Kornfield resolved ARROW-5705. ------------------------------------ Resolution: Fixed Fix Version/s: 0.14.0 Issue resolved by pull request 4671 [https://github.com/apache/arrow/pull/4671] > [Java] Optimize BaseValueVector#computeCombinedBufferSize logic > --------------------------------------------------------------- > > Key: ARROW-5705 > URL: https://issues.apache.org/jira/browse/ARROW-5705 > Project: Apache Arrow > Issue Type: Improvement > Components: Java > Reporter: Ji Liu > Assignee: Ji Liu > Priority: Minor > Labels: pull-request-available > Fix For: 0.14.0 > > Time Spent: 4h 20m > Remaining Estimate: 0h > > Now in BaseValueVector#computeCombinedBufferSize, it computes validity buffer > size as follow: > _roundUp8(getValidityBufferSizeFromCount(valueCount))_ > which can be be expanded to > _(((valueCount + 7) >> 3 + 7) / 8) * 8_ > Seems there's no need to compute bufferSize first and expression above could > be replaced with: > _(valueCount + 63) / 64 * 8_ > In this way, performance of _computeCombinedBufferSize_ would be improved. > Performance test: > Before: > BaseValueVectorBenchmarks.testC_omputeCombinedBufferSize_ avgt 5 4083.180 ± > 180.363 ns/op > After: > BaseValueVectorBenchmarks.testC_omputeCombinedBufferSize_ avgt 5 3808.635 ± > 162.347 ns/op > -- This message was sent by Atlassian JIRA (v7.6.3#76005)