memtx: introduce tuple compare hint
Implement functions for retrieving tuple hints for a particular key_def. Hint is an integer that can be used for tuple comparison optimization: if a hint of one tuple is less than a hint of another then the first tuple is definitely less than the second; only if hints are equal tuple_compare must be called for getting comparison result. Hints are calculated using only the first part of key_def. @locker: - Rework key_def_set_hint_func. - Refactor functions calculating hints. - Drop has_collation template argument (we don't use templates for collations anywhere else). - Add part_count argument to key_hint (it's conventional to pass part_count along with decoded key). - Improve comments, rename a few functions, and cleanup code. Close #3961
Showing
- src/box/key_def.h 115 additions, 0 deletionssrc/box/key_def.h
- src/box/memtx_tree.c 30 additions, 10 deletionssrc/box/memtx_tree.c
- src/box/tuple_compare.cc 519 additions, 16 deletionssrc/box/tuple_compare.cc
- src/lib/coll/coll.c 26 additions, 0 deletionssrc/lib/coll/coll.c
- src/lib/coll/coll.h 12 additions, 0 deletionssrc/lib/coll/coll.h
Loading
Please register or sign in to comment