Fix induction (again). Now it's 176 bytes per key
All checks were successful
Tests / Release [gcc] total: 932, passed: 932
GNU C Compiler (gcc) |Total|New|Outstanding|Fixed|Trend
|:-:|:-:|:-:|:-:|:-:
|0|0|0|0|:clap:
Tests / Release [gcc,aarch64] total: 931, passed: 931
Tests / Coverage total: 930, passed: 930
weaselab/conflict-set/pipeline/head This commit looks good
All checks were successful
Tests / Release [gcc] total: 932, passed: 932
GNU C Compiler (gcc) |Total|New|Outstanding|Fixed|Trend
|:-:|:-:|:-:|:-:|:-:
|0|0|0|0|:clap:
Tests / Release [gcc,aarch64] total: 931, passed: 931
Tests / Coverage total: 930, passed: 930
weaselab/conflict-set/pipeline/head This commit looks good
This commit is contained in:
@@ -265,20 +265,22 @@ std::string getSearchPathPrintable(Node *n);
|
|||||||
|
|
||||||
// Bound memory usage following the analysis in the ART paper
|
// Bound memory usage following the analysis in the ART paper
|
||||||
|
|
||||||
constexpr int kBytesPerKey = 120;
|
constexpr int kBytesPerKey = 176;
|
||||||
|
constexpr int kMinSavingsPerNode = 120;
|
||||||
constexpr int kMinChildrenNode4 = 2;
|
constexpr int kMinChildrenNode4 = 2;
|
||||||
constexpr int kMinChildrenNode16 = 5;
|
constexpr int kMinChildrenNode16 = 5;
|
||||||
constexpr int kMinChildrenNode48 = 17;
|
constexpr int kMinChildrenNode48 = 17;
|
||||||
constexpr int kMinChildrenNode256 = 49;
|
constexpr int kMinChildrenNode256 = 49;
|
||||||
|
|
||||||
static_assert(sizeof(Node256) + kBytesPerKey <=
|
static_assert(sizeof(Node256) + kMinSavingsPerNode <=
|
||||||
kMinChildrenNode256 * kBytesPerKey);
|
kMinChildrenNode256 * kMinSavingsPerNode);
|
||||||
static_assert(sizeof(Node48) + kBytesPerKey <=
|
static_assert(sizeof(Node48) + kMinSavingsPerNode <=
|
||||||
kMinChildrenNode48 * kBytesPerKey);
|
kMinChildrenNode48 * kMinSavingsPerNode);
|
||||||
static_assert(sizeof(Node16) + kBytesPerKey <=
|
static_assert(sizeof(Node16) + kMinSavingsPerNode <=
|
||||||
kMinChildrenNode16 * kBytesPerKey);
|
kMinChildrenNode16 * kMinSavingsPerNode);
|
||||||
static_assert(sizeof(Node4) + kBytesPerKey <= kMinChildrenNode4 * kBytesPerKey);
|
static_assert(sizeof(Node4) + kMinSavingsPerNode <=
|
||||||
static_assert(sizeof(Node0) <= kBytesPerKey);
|
kMinChildrenNode4 * kMinSavingsPerNode);
|
||||||
|
static_assert(sizeof(Node0) + kMinSavingsPerNode <= kBytesPerKey);
|
||||||
|
|
||||||
// setOldestVersion will additionally try to maintain this property:
|
// setOldestVersion will additionally try to maintain this property:
|
||||||
// `max(children, 1) * length >= capacity`
|
// `max(children, 1) * length >= capacity`
|
||||||
|
Reference in New Issue
Block a user