forked from tidwall/btree
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 ```
- Loading branch information
Showing
4 changed files
with
231 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters