Class Packed64
Space optimized random access capable array of values with a fixed number of bits/value. Values are packed contiguously.
The implementation strives to perform af fast as possible under the constraint of contiguous bits, by avoiding expensive operations. This comes at the cost of code clarity.
Technical details: this implementation is a refinement of a non-branching version. The non-branching get and set methods meant that 2 or 4 atomics in the underlying array were always accessed, even for the cases where only 1 or 2 were needed. Even with caching, this had a detrimental effect on performance. Related to this issue, the old implementation used lookup tables for shifts and masks, which also proved to be a bit slower than calculating the shifts and masks on the fly. See https://issues.apache.org/jira/browse/LUCENE-4062 for details.
Inheritance
Inherited Members
Assembly: DistributedLucene.Net.dll
Syntax
public class Packed64 : PackedInt32s.MutableImpl
Constructors
Name | Description |
---|---|
Packed64(Int32, DataInput, Int32, Int32) | Creates an array with content retrieved from the given DataInput. |
Packed64(Int32, Int32) | Creates an array with the internal structures adjusted for the given limits and initialized to 0. |
Methods
Name | Description |
---|---|
Clear() | |
Fill(Int32, Int32, Int64) | |
Get(Int32) | |
Get(Int32, Int64[], Int32, Int32) | |
RamBytesUsed() | |
Set(Int32, Int64) | |
Set(Int32, Int64[], Int32, Int32) | |
ToString() |