Skip to content

Commit

Permalink
use min-max-heap for merge iterator
Browse files Browse the repository at this point in the history
  • Loading branch information
marvin-j97 committed Nov 29, 2023
1 parent ae8c257 commit 2e75d77
Show file tree
Hide file tree
Showing 4 changed files with 208 additions and 157 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ chrono = "0.4.31"
crc32fast = "1.3.2"
log = "0.4.20"
lz4_flex = "0.11.1"
min-max-heap = "1.3.0"
quick_cache = { version = "0.4.0", default-features = false }
rand = "0.8.5"
serde = { version = "1.0.192", features = ["derive"] }
Expand Down
10 changes: 5 additions & 5 deletions benches/lsmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,10 @@ fn full_scan(c: &mut Criterion) {
let item_count = 500_000;

group.bench_function("full scan uncached", |b| {
let tree = Config::new(tempdir().unwrap()).open().unwrap();
let tree = Config::new(tempdir().unwrap())
.block_cache_size(0)
.open()
.unwrap();

for x in 0_u32..item_count {
let key = x.to_be_bytes();
Expand All @@ -212,10 +215,7 @@ fn full_scan(c: &mut Criterion) {
});

group.bench_function("full scan cached", |b| {
let tree = Config::new(tempdir().unwrap())
.block_cache_size(100_000)
.open()
.unwrap();
let tree = Config::new(tempdir().unwrap()).open().unwrap();

for x in 0_u32..item_count {
let key = x.to_be_bytes();
Expand Down
Loading

0 comments on commit 2e75d77

Please sign in to comment.