-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bt index: read value if key matches straight away (#12786)
another try to improve bt indices. + keep cursors in pool + untie Cursor from BtIndex, now it shares ptr to pool for cursor disposal after .Close() and ptr to eliasFano mapping of `di -> offset_to_key` + reduce allocations to zero during seek + Changed seek semantics. Previously we returned true if key matches exactly to `seekKey`. Now caller should do such check if needed. Seek guarantees to return exact match OR first key bigger than `seekKey` + changed Get semantics - now it returns value for given `key` with only one exception: nil key returns value for first key. + read Value immediately if key matches during Get (skip another ef.Get and decoding key twice) Reduces load on GC and slightly improves performance tried to use `MatchCmp` as well but this causes gas mismatch (i assume during reading from compressed file, because local tests are green though).
- Loading branch information
Showing
13 changed files
with
301 additions
and
149 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
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
Oops, something went wrong.