Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-5225

[Java] Improve performance of BaseValueVector#getValidityBufferSizeFromCount

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • None
    • 0.14.0
    • Java

    Description

      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;

      Attachments

        Issue Links

          Activity

            People

              tianchen92 Ji Liu
              tianchen92 Ji Liu
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 20m
                  1h 20m