You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Micah Kornfield (JIRA)" <ji...@apache.org> on 2019/04/29 18:24:00 UTC

[jira] [Resolved] (ARROW-5225) [Java] Improve performance of BaseValueVector#getValidityBufferSizeFromCount

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

Micah Kornfield resolved ARROW-5225.
------------------------------------
       Resolution: Fixed
    Fix Version/s: 0.14.0

Issue resolved by pull request 4218
[https://github.com/apache/arrow/pull/4218]

> [Java] Improve performance of BaseValueVector#getValidityBufferSizeFromCount
> ----------------------------------------------------------------------------
>
>                 Key: ARROW-5225
>                 URL: https://issues.apache.org/jira/browse/ARROW-5225
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: Java
>            Reporter: Ji Liu
>            Assignee: Ji Liu
>            Priority: Trivial
>              Labels: pull-request-available
>             Fix For: 0.14.0
>
>          Time Spent: 1h 20m
>  Remaining Estimate: 0h
>
> Now in _BaseValueVector#getValidityBufferSizeFromCount_  and _BitVectorHelper#getValidityBufferSize_, it uses _Math.ceil_ to calculate size which is not efficient (lots of unnecessary logic in _StrictMath#floorOrCeil_) . Since the valueCount is always not less than 0, we could simply replace _Math.ceil_ with the following code:
> _return (valueCount+7) >> 3_;



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)