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.