rocksdb/memtable
Changyu Bi 92ad4a88f3 Small CPU optimization in InlineSkipList::Insert() (#12975)
Summary:
reuse decode key in more places to avoid decoding length prefixed key x->Key().

Pull Request resolved: https://github.com/facebook/rocksdb/pull/12975

Test Plan:
ran benchmarks simultaneously for "before" and "after"
* fillseq:
```
(for I in $(seq 1 50); do ./db_bench --benchmarks=fillseq --disable_auto_compactions=1 --min_write_buffer_number_to_merge=100 --max_write_buffer_number=1000  --write_buffer_size=268435456 --num=5000000 --seed=1723056275 --disable_wal=1 2>&1 | grep "fillseq"
done;) | awk '{ t += $5; c++; print } END { printf ("%9.3f\n", 1.0 * t / c) }';

before: 1483191
after: 1490555 (+0.5%)
```

* fillrandom:
```
(for I in $(seq 1 2); do ./db_bench_imain --benchmarks=fillrandom --disable_auto_compactions=1 --min_write_buffer_number_to_merge=100 --max_write_buffer_number=1000  --write_buffer_size=268435456 --num=2500000 --seed=1723056275 --disable_wal=1 2>&1 | grep "fillrandom"

before: 255463
after: 256128 (+0.26%)
```

Reviewed By: anand1976

Differential Revision: D61835340

Pulled By: cbi42

fbshipit-source-id: 70345510720e348bacd51269acb5d2dd5a62bf0a
2024-08-27 13:57:40 -07:00
..
alloc_tracker.cc internal_repo_rocksdb (-8794174668376270091) (#12114) 2023-12-01 11:10:30 -08:00
hash_linklist_rep.cc Remove 'virtual' when implied by 'override' (#12319) 2024-01-31 13:14:42 -08:00
hash_skiplist_rep.cc Remove 'virtual' when implied by 'override' (#12319) 2024-01-31 13:14:42 -08:00
inlineskiplist.h Small CPU optimization in InlineSkipList::Insert() (#12975) 2024-08-27 13:57:40 -07:00
inlineskiplist_test.cc Prefer static_cast in place of most reinterpret_cast (#12308) 2024-02-07 10:44:11 -08:00
memtablerep_bench.cc Remove RocksDB LITE (#11147) 2023-01-27 13:14:19 -08:00
skiplist.h Run clang format against files under example/, memory/ and memtable/ folders (#10893) 2022-10-28 13:16:50 -07:00
skiplist_test.cc Prefer static_cast in place of most reinterpret_cast (#12308) 2024-02-07 10:44:11 -08:00
skiplistrep.cc Add an option to verify memtable key order during reads (#12889) 2024-08-19 13:53:25 -07:00
stl_wrappers.h Run clang format against files under example/, memory/ and memtable/ folders (#10893) 2022-10-28 13:16:50 -07:00
vectorrep.cc internal_repo_rocksdb (-8794174668376270091) (#12114) 2023-12-01 11:10:30 -08:00
write_buffer_manager.cc Add SetAllowStall() (#11335) 2023-03-30 09:43:33 -07:00
write_buffer_manager_test.cc Put Cache and CacheWrapper in new public header (#11192) 2023-02-09 12:12:02 -08:00