Class SparseConstants
java.lang.Object
io.deephaven.engine.table.impl.sources.sparse.SparseConstants
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final int
static final long
static final int
static final int
static final int
static final int
static final int
static final int
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
sparseStructureExceedsOverhead
(RowSet rowSet, double maximumOverhead) When using sparse data structures, a single entry within a block can result in the data size increasing by a factor of BLOCK_SIZE.
-
Field Details
-
LOG_BLOCK0_SIZE
public static final int LOG_BLOCK0_SIZE- See Also:
-
LOG_BLOCK1_SIZE
public static final int LOG_BLOCK1_SIZE- See Also:
-
LOG_BLOCK2_SIZE
public static final int LOG_BLOCK2_SIZE- See Also:
-
LOG_BLOCK_SIZE
public static final int LOG_BLOCK_SIZE- See Also:
-
BLOCK0_SHIFT
public static final int BLOCK0_SHIFT- See Also:
-
BLOCK1_SHIFT
public static final int BLOCK1_SHIFT- See Also:
-
BLOCK2_SHIFT
public static final int BLOCK2_SHIFT- See Also:
-
INDEX_MASK
public static final long INDEX_MASK- See Also:
-
BLOCK0_MASK
public static final int BLOCK0_MASK- See Also:
-
BLOCK1_MASK
public static final int BLOCK1_MASK- See Also:
-
BLOCK2_MASK
public static final int BLOCK2_MASK- See Also:
-
BLOCK_SIZE
public static final int BLOCK_SIZE- See Also:
-
BLOCK0_SIZE
public static final int BLOCK0_SIZE- See Also:
-
BLOCK1_SIZE
public static final int BLOCK1_SIZE- See Also:
-
BLOCK2_SIZE
public static final int BLOCK2_SIZE- See Also:
-
LOG_INUSE_BITSET_SIZE
public static final int LOG_INUSE_BITSET_SIZE- See Also:
-
LOG_INUSE_BLOCK_SIZE
public static final int LOG_INUSE_BLOCK_SIZE- See Also:
-
IN_USE_BLOCK_SIZE
public static final int IN_USE_BLOCK_SIZE- See Also:
-
IN_USE_MASK
public static final int IN_USE_MASK- See Also:
-
-
Constructor Details
-
SparseConstants
public SparseConstants()
-
-
Method Details
-
sparseStructureExceedsOverhead
When using sparse data structures, a single entry within a block can result in the data size increasing by a factor of BLOCK_SIZE. On the other hand, we would strongly prefer the sparse results because they are generally much faster than the alternatives.To balance those concerns, we can determine if a given rowSet exceeds some overhead threshold and act accordingly.
- Parameters:
rowSet
- the Index that we should calculate the overhead formaximumOverhead
- the maximum overhead as a fraction (e.g. 1.1 is 10% overhead). Values less than zero disable overhead checking, and result in always using the sparse structure. A value of zero results in never using the sparse structure.
-