A generic type Go AVL tree implementation, forked from Yawning Angel, derived from Eric Biggers' C code, in the spirt of the runtime library's containers.
Features:
- Size
- Insertion
- Deletion
- Search
- In-order traversal (forward and backward) with an iterator or callback.
- Non-recursive.
Generic Improve:
- Generic type improved over 20% compared to interface{} generic func
- Benchmark cmp
benchmark old ns/op new ns/op delta BenchmarkAVLInsert 1003 674 -32.83% BenchmarkAVLFind 880 687 -21.92% BenchmarkAVLDeleteLeft 0.16 69.0 +42812.26%
Note:
- The package itself is free from external dependencies, the unit tests use testify. dependencies removed