[
https://issues.apache.org/jira/browse/LUCENE-5721?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Adrien Grand updated LUCENE-5721:
---------------------------------
Attachment: LUCENE-5703.patch
Here is a patch that adjusts the origin of a block (the B of {{A * x + B}}) so
that all deltas are positive. This seems to improve performance by about 10%
when using {{PackedInts.FASTEST}} on {{MonotonicAppendingLongBuffer}}, and it
also reduces memory usage in certain cases since it might save a bit (eg. if
the min delta was -1 and the max 6, we used to require bitsRequired(Math.max(6,
1)) + 1 = 4 bits while it would now require bitsRequired(6 - (-1)) =
bitsRequired(7) = 3).
> Monotonic packed could maybe be faster
> --------------------------------------
>
> Key: LUCENE-5721
> URL: https://issues.apache.org/jira/browse/LUCENE-5721
> Project: Lucene - Core
> Issue Type: Improvement
> Reporter: Robert Muir
> Assignee: Adrien Grand
> Attachments: LUCENE-5703.patch
>
>
> This compression is used in lucene for monotonically increasing offsets, e.g.
> stored fields index, dv BINARY/SORTED_SET offsets, OrdinalMap (used for
> merging and faceting dv) and so on.
> Today this stores a +/- deviation from an expected line of y=mx + b, where b
> is the minValue for the block and m is the average delta from the previous
> value. Because it can be negative, we have to do some additional work to
> zigzag-decode.
> Can we just instead waste a bit for every value explicitly (lower the
> minValue by the min delta) so that deltas are always positive and we can have
> a simpler decode? Maybe If we do this, the new guy should assert that values
> are actually monotic at write-time. The current one supports "mostly monotic"
> but do we really need that flexibility anywhere? If so it could always be
> kept...
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]