Skip to content

Commit 483430b

Browse files
committed
bench: drop sub-noise-floor sizes from bitwise_not_vortex_buffer_mut
bitwise_not_vortex_buffer_mut[128/1024/2048] was the noisiest benchmark on CodSpeed after #8490: it flipped between the same two values in both directions (+27.1%/-10.66% etc.) on roughly half of ~47 recently merged PRs, including PRs changing only docs, uv.lock, or workflow YAML. The Not impl for an owned BitBufferMut runs bitwise_unary_op_mut in place - no allocation, no memcpy. At 128-2048 bits that is a handful of word ops, so the reported number is fixed divan harness overhead plus binary code layout, both of which shift with any unrelated code change. Those sizes never measured the operation at all, so remove them outright; 16384 and 65536, where the loop dominates, were never flagged and remain. Signed-off-by: Claude <noreply@anthropic.com> Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T6PPcdrqcNeUkfi1EGd4oC
1 parent 002e40a commit 483430b

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

vortex-buffer/benches/vortex_bitbuffer.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,12 @@ fn bitwise_not_vortex_buffer(bencher: Bencher, length: usize) {
246246
.bench_values(|buffer| !&buffer);
247247
}
248248

249-
#[divan::bench(args = INPUT_SIZE)]
249+
/// The in-place NOT on an owned `BitBufferMut` performs no allocation and no copy, so below a
250+
/// few thousand bits the measurement is fixed harness overhead and binary code layout rather
251+
/// than the loop itself. Only the sizes where the loop dominates are worth measuring.
252+
const NOT_MUT_INPUT_SIZE: &[usize] = &[16_384, 65_536];
253+
254+
#[divan::bench(args = NOT_MUT_INPUT_SIZE)]
250255
fn bitwise_not_vortex_buffer_mut(bencher: Bencher, length: usize) {
251256
bencher
252257
.with_inputs(|| BitBufferMut::from_iter((0..length).map(|i| i % 2 == 0)))

0 commit comments

Comments
 (0)