Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-10145

Use VarHandles to speedup byte[] comparisons in some cases

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 9.0
    • None
    • None
    • New

    Description

      I noticed that using Long#compareUnsigned on longs read via VarHandles is significantly faster than calling compareUnsigned directly. There are cases when this could be leveraged easily such as BKDWriter, which often keeps comparing 4-bytes or 8-bytes across byte[] arrays.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jpountz Adrien Grand
              Votes:
              0 Vote for this issue
              Watchers:
              2 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