You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2019/06/24 08:51:00 UTC

[jira] [Updated] (ARROW-5705) [Java] Optimize BaseValueVector#computeCombinedBufferSize logic

     [ https://issues.apache.org/jira/browse/ARROW-5705?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

ASF GitHub Bot updated ARROW-5705:
----------------------------------
    Labels: pull-request-available  (was: )

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