mirror of
https://github.com/google/leveldb.git
synced 2025-04-25 14:00:27 +08:00
kBranching 16 is better than 4 in db benchmarks
This commit is contained in:
parent
5903e7a112
commit
d0254fd8ae
@ -241,7 +241,7 @@ inline void SkipList<Key, Comparator>::Iterator::SeekToLast() {
|
||||
template <typename Key, class Comparator>
|
||||
int SkipList<Key, Comparator>::RandomHeight() {
|
||||
// Increase height with probability 1 in kBranching
|
||||
static const unsigned int kBranching = 4;
|
||||
static const unsigned int kBranching = 16;
|
||||
int height = 1;
|
||||
while (height < kMaxHeight && ((rnd_.Next() % kBranching) == 0)) {
|
||||
height++;
|
||||
|
Loading…
Reference in New Issue
Block a user