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

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

Ji Liu created ARROW-5225:
-----------------------------

             Summary: [Java] Improve performance of BaseValueVector#getValidityBufferSizeFromCount
                 Key: ARROW-5225
                 URL: https://issues.apache.org/jira/browse/ARROW-5225
             Project: Apache Arrow
          Issue Type: Improvement
            Reporter: Ji Liu
            Assignee: Ji Liu


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 % 8 > 0 ? valueCount / 8 + 1 : valueCount / 8_;



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