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

[Java] Compare ArrowBufPointers by unsinged integers

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 0.15.0
    • Java

    Description

      Currently, ArrowBufPointers compare by bytes in lexicographic order. Another way is to compare by unsigned integers (longs, ints, & bytes). 

      The second way involves additional bit operations for each iteration. However, it can compare 8 bytes at a time. So it is overall faster:

       

      Compare by unsigned integers:

      ArrowBufPointerBenchmarks.compareBenchmark avgt 5 65.722 ± 0.381 ns/op

       

      Compare byte-wise:
      ArrowBufPointerBenchmarks.compareBenchmark avgt 5 681.372 ± 0.604 ns/op

      Attachments

        Issue Links

          Activity

            People

              fan_li_ya Liya Fan
              fan_li_ya Liya Fan
              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 - 40m
                  40m