Skip to content Search Apps Documentation Source Content Run Reset Eval Playground File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

doc.gno

0.62 Kb · 16 lines
 1// Package bptree provides a mutable B+ tree implementation for storing
 2// key-value data in Gno realms. It implements the same ITree interface
 3// as the avl package but uses a B+ tree internally for better cache
 4// locality and fewer pointer dereferences per operation.
 5//
 6// The fanout (maximum number of children per inner node, and maximum
 7// number of entries per leaf node) is configurable:
 8//
 9//	tree := bptree.NewBPTree32()    // fanout 32
10//	tree := bptree.NewBPTreeN(64)   // fanout 64
11//
12// The zero value is usable as an empty tree with fanout 32:
13//
14//	var tree bptree.BPTree
15//	tree.Set("key", "value")
16package bptree