Lucene - Core
  1. Lucene - Core
  2. LUCENE-5760

Speed up BufferedIndexInput.randomAccessSlice

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.9, 6.0
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      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.

        Activity

        Hide
        Robert Muir added a comment -

        patch

        Show
        Robert Muir added a comment - patch
        Hide
        Michael McCandless added a comment -

        +1

        Show
        Michael McCandless added a comment - +1
        Hide
        Adrien Grand added a comment -

        +1

        Show
        Adrien Grand added a comment - +1
        Hide
        ASF subversion and git services added a comment -

        Commit 1602530 from Robert Muir in branch 'dev/trunk'
        [ https://svn.apache.org/r1602530 ]

        LUCENE-5760: Speed up BufferedIndexInput.randomAccessSlice

        Show
        ASF subversion and git services added a comment - Commit 1602530 from Robert Muir in branch 'dev/trunk' [ https://svn.apache.org/r1602530 ] LUCENE-5760 : Speed up BufferedIndexInput.randomAccessSlice
        Hide
        ASF subversion and git services added a comment -

        Commit 1602531 from Robert Muir in branch 'dev/branches/branch_4x'
        [ https://svn.apache.org/r1602531 ]

        LUCENE-5760: Speed up BufferedIndexInput.randomAccessSlice

        Show
        ASF subversion and git services added a comment - Commit 1602531 from Robert Muir in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1602531 ] LUCENE-5760 : Speed up BufferedIndexInput.randomAccessSlice

          People

          • Assignee:
            Unassigned
            Reporter:
            Robert Muir
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development