Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions encodings/runend/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ workspace = true
[dev-dependencies]
divan = { workspace = true }
itertools = { workspace = true }
mimalloc = { workspace = true }
rand = { workspace = true }
rstest = { workspace = true }
vortex-array = { workspace = true, features = ["_test-harness"] }
Expand Down
7 changes: 7 additions & 0 deletions encodings/runend/benches/run_end_compress.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use std::sync::LazyLock;

use divan::Bencher;
use itertools::repeat_n;
use mimalloc::MiMalloc;
use vortex_array::IntoArray;
use vortex_array::RecursiveCanonical;
use vortex_array::VortexSessionExecute;
Expand All @@ -19,6 +20,12 @@ use vortex_runend::RunEnd;
use vortex_runend::compress::runend_encode;
use vortex_session::VortexSession;

// `runend_encode` allocates its output buffers inside the timed region, so route allocation
// through vendored mimalloc to keep glibc malloc (which varies across runner images) out of
// the measured trace.
#[global_allocator]
static GLOBAL: MiMalloc = MiMalloc;

fn main() {
divan::main();
}
Expand Down
7 changes: 7 additions & 0 deletions vortex-array/benches/cast_decimal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
use std::sync::LazyLock;

use divan::Bencher;
use mimalloc::MiMalloc;
use rand::prelude::*;
use vortex_array::ArrayRef;
use vortex_array::Canonical;
Expand All @@ -28,6 +29,12 @@ use vortex_array::validity::Validity;
use vortex_buffer::BufferMut;
use vortex_session::VortexSession;

// The copy casts allocate their output buffer inside the timed region, so route allocation
// through vendored mimalloc to keep glibc malloc (which varies across runner images) out of
// the measured trace.
#[global_allocator]
static GLOBAL: MiMalloc = MiMalloc;

fn main() {
divan::main();
}
Expand Down
9 changes: 7 additions & 2 deletions vortex-buffer/benches/vortex_bitbuffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,12 @@ fn slice_arrow_buffer(bencher: Bencher, length: usize) {
});
}

#[divan::bench(args = INPUT_SIZE)]
/// A 128-bit `true_count` is a popcount over two `u64` words, so the measurement is fixed
/// dispatch and harness overhead plus binary code layout rather than the count itself. Only
/// sizes where the popcount loop dominates are worth measuring.
const TRUE_COUNT_INPUT_SIZE: &[usize] = &[1024, 2048, 16_384, 65_536];

#[divan::bench(args = TRUE_COUNT_INPUT_SIZE)]
fn true_count_vortex_buffer(bencher: Bencher, length: usize) {
let buffer = BitBuffer::from_iter((0..length).map(true_count_pattern));

Expand All @@ -185,7 +190,7 @@ fn true_count_vortex_buffer(bencher: Bencher, length: usize) {
.bench_refs(|buffer| buffer.true_count())
}

#[divan::bench(args = INPUT_SIZE)]
#[divan::bench(args = TRUE_COUNT_INPUT_SIZE)]
fn true_count_arrow_buffer(bencher: Bencher, length: usize) {
let buffer = Arrow(BooleanBuffer::from_iter(
(0..length).map(true_count_pattern),
Expand Down
Loading