|
|
Up to this address width every address gets a slot number in one flat array: 2^16 ints is
256kB, which is always affordable. Above it the address space outruns what can be
allocated and the memory is assumed to be occupied thinly.
-
Returns:
int
|
|
|
Up to this address width an address still fits a uint32 and the trie can key on one.
Above it addresses arrive as bigints and the lookup falls back to a Map - a memory with
more than 4G words cannot be meaningfully simulated, so that path is a guard, not a
design.
-
Returns:
int
|
|
|
Compact once the tail is at least this long *and* at least as long as what is already
indexed. Doubling like this makes the copying amortised O(1) a write.
Waiting for a query instead, when there is nothing out of window to drop, was tried and is
worse: a tail entry carries a slot number that an indexed one does not, so leaving writes
in the tail costs 12 bytes each against 8, and on a hundred small RAMs that measured 19.9 MB
against 11.8 MB with no speed to show for it.
-
Returns:
int
|
|
|
Children per trie node. Four bits a level.
-
Returns:
int
|