Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use VecDeque for storing entry indexes in log batch #174

Closed
wants to merge 6 commits into from

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