Possible mistake in "type node48 struct "
candrade2020 opened this issue · comments
candrade2020 commented
In node.go, will be keys 48 bytes long?
type node48 struct {
node
children [node48Max]*artNode
// keys [node256Max]byte
keys [node48Max]byte
present [4]uint64 // need 256 bits for keys
}
Pavel Larkin commented
Please read spec for Node48 here: https://db.in.tum.de/~leis/papers/ART.pdf
Node48
...
a 256-element array is used, which can be indexed with key bytes directly. If a node has between 17 and 48 child pointers, this array stores indexes into a second array which contains up to 48 pointers.