Skip to content

Conversation

@tabokie
Copy link
Member

@tabokie tabokie commented Dec 9, 2021

After rust-lang/rust#88717, append is favored over extend-ing a Vec. This PR updates toolchain and change all entry indexes containers to VecDeque.

Micro-benchmark shows 6% improvements when appending 10 indexes:

vec:
test memtable::tests::bench_memtable_append                 ... bench:         350 ns/iter (+/- 67)
test memtable::tests::bench_memtable_append                 ... bench:         347 ns/iter (+/- 21)
vecdeque:
test memtable::tests::bench_memtable_append                 ... bench:         328 ns/iter (+/- 49)
test memtable::tests::bench_memtable_append                 ... bench:         326 ns/iter (+/- 36)

Signed-off-by: tabokie <xy.tao@outlook.com>
Signed-off-by: tabokie <xy.tao@outlook.com>
Signed-off-by: tabokie <xy.tao@outlook.com>
Signed-off-by: tabokie <xy.tao@outlook.com>
Signed-off-by: tabokie <xy.tao@outlook.com>
…deque

Signed-off-by: tabokie <xy.tao@outlook.com>
@tabokie tabokie closed this Apr 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant