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

use slice() api in packedints decode

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • None
    • None
    • None
    • None
    • New

    Description

      Today, for example 8-bpv decoder looks like this:

      in.seek(startPointer + index);
      return in.readByte() & 0xFF;
      

      If instead we take a slice of 'in', we can remove an addition. Its not much, but helps a little. additionally we already (in PackedInts.java) compute the number of bytes, so we could make this an actual slice of the range, which would return an error on abuse instead of garbage data.

      Attachments

        1. LUCENE-5728.patch
          10 kB
          Robert Muir

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: