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

Speed up BufferedIndexInput.randomAccessSlice

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 4.9, 6.0
    • None
    • None
    • New

    Description

      Today this uses the default implementation, e.g. for readInt(pos):

      @Override
      public int readInt(long pos) throws IOException {
        slice.seek(pos);
        return slice.readInt();
      }
      

      But this causes the bounds to be checked twice. Just like we did for MMap, we can provide a faster implementation that only checks once: yields ~30% speedup.

      Attachments

        1. LUCENE-5760.patch
          8 kB
          Robert Muir

        Activity

          People

            Unassigned Unassigned
            rcmuir Robert Muir
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: