rocksdb
rocksdb copied to clipboard
Comparator: Add func: IsBytewiseComparator & IsReverseBytewiseComparator
- Virtual function call to comparator is very frequent thus is a hot spot
- In most use cases, the default
BytewiseComparatororReverseBytewiseComparatoris used
This PR provide the basic support for our later PRs for FindFileInRange and MergingIterator:
- devirtualize such virtual functions calls for
BytewiseComparatororReverseBytewiseComparator - Add prefix cache to omit most
memcmpand indirect memory access tokey
Performance of FindFileInRange was improved 20x+, MergingIterator was improved 3x+.
see PR: #10646 FindFileInRange devirtualization and prefix cache
PR MergingIterator depends on PR #9035 thus we would create it later.