You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Robert Muir (JIRA)" <ji...@apache.org> on 2014/06/04 20:53:02 UTC
[jira] [Resolved] (LUCENE-5728) use slice() api in packedints
decode
[ https://issues.apache.org/jira/browse/LUCENE-5728?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Muir resolved LUCENE-5728.
---------------------------------
Resolution: Duplicate
see LUCENE-5731
> use slice() api in packedints decode
> ------------------------------------
>
> Key: LUCENE-5728
> URL: https://issues.apache.org/jira/browse/LUCENE-5728
> Project: Lucene - Core
> Issue Type: Improvement
> Reporter: Robert Muir
> Attachments: LUCENE-5728.patch
>
>
> Today, for example 8-bpv decoder looks like this:
> {code}
> in.seek(startPointer + index);
> return in.readByte() & 0xFF;
> {code}
> 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.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org