mirror of
https://github.com/MarginaliaSearch/MarginaliaSearch.git
synced 2025-02-23 21:18:58 +00:00
(coded-sequence) Reduce allocations in GCS.values()
This commit is contained in:
parent
3fb3c0b92e
commit
6dda2c2d83
@ -93,8 +93,8 @@ public class GammaCodedSequence implements Iterable<Integer>, CodedSequence {
|
||||
}
|
||||
|
||||
public IntList values() {
|
||||
var intItr = iterator();
|
||||
IntArrayList ret = new IntArrayList(8);
|
||||
var intItr = new EliasGammaSequenceIterator(buffer());
|
||||
IntArrayList ret = new IntArrayList(intItr.rem);
|
||||
while (intItr.hasNext()) {
|
||||
ret.add(intItr.nextInt());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user