Closed tabokie closed 2 years ago
After https://github.com/rust-lang/rust/pull/88717, append is favored over extend-ing a Vec. This PR updates toolchain and change all entry indexes containers to VecDeque.
append
extend
Vec
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)
After https://github.com/rust-lang/rust/pull/88717,
append
is favored overextend
-ing aVec
. This PR updates toolchain and change all entry indexes containers toVecDeque
.Micro-benchmark shows 6% improvements when appending 10 indexes: