Skip to content

Tags: tidwall/btree

Tags

v1.7.0

Added AscendHint, DescendHint, and SeekHint to BTree and BTreeG

These new functions allow for using a path hint with iterators,
making it potentially faster when seeking to the first item in the iteration.

Benchmarks:

https://github.com/tidwall/btree-benchmark

About path hints:

https://github.com/tidwall/btree/blob/master/PATH_HINT.md

Usage:

```go
tr.AscendHint(key, iter, &hint)   // iterate items that are >= key, ascending
tr.DescendHint(key, iter, &hint)  // iterate items that are <= key, descending
iter.SeekHint(key, &hint)         // seek to item that is >= key
```

v1.6.0

Added Mut methods

This commits includes new Mut methods which ensure that values get
correctly copied, if needed, following a btree Copy() operations.

This effictively allows for the BTree Copy method to create an isolated
snapshot that cascades to the interior values. Such as a BTree that has
nested BTrees as values.

Mut methods are only useful when all of the following are true:

- The interior data of the values require changes.
- The value is a pointer type.
- The BTree has been copied using `Copy()` or `IsoCopy()`.
- The value itself has a `Copy()` or `IsoCopy()` method.

Mut methods may modify the tree structure and should have the same
considerations as other mutable operations like Set, Delete, Clear, etc.

New methods include GetMut, ScanMut, AscendMut, DescendMut, ReverseMut,
IterMut, MinMut, MaxMut, etc.

v1.5.2

Update to Go 1.19

v1.5.1

Revert default degree

v1.5.0

Allow custom degree

v1.4.4

Update entire item

v1.4.3

Added Clear method

v1.4.2

Remove sort package

v1.4.1

Use BTreeG instead of Generics and various optimizations

This commit includes:
- deprecates the Generic type in favor of BTreeG.
- uses an atomic uint64 for copy-on-write marker.
- minimized new allocations on splits.

v1.4.0

Various optimizations