Skip to content

Conversation

@alamb
Copy link
Contributor

@alamb alamb commented Nov 19, 2025

Note to self:

  • Apply the same thing to buffer_bit_ops benchmarks

Which issue does this PR close?

We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax.

  • Closes #NNN.

Rationale for this change

The boolean and bitwise kernels are currently very noisy and sometimes get nonsensical results (e.g. #8854 (comment)) I think this is because they are so fast. For example, Here is an output from a recent run (note the benchmark each takes only nanoseconds

group         alamb_bitwise_ops                      main
-----         -----------------                      ----
and           1.00    272.4±1.45ns        ? ?/sec    1.00    273.1±1.36ns        ? ?/sec
and_sliced    1.00   1096.0±1.60ns        ? ?/sec    1.00   1095.1±2.77ns        ? ?/sec
not           1.00    213.8±0.29ns        ? ?/sec    1.00    214.0±0.40ns        ? ?/sec
not_sliced    1.00    965.6±9.77ns        ? ?/sec    1.00    961.8±5.75ns        ? ?/sec
or            1.00    254.1±0.66ns        ? ?/sec    1.01    255.6±0.41ns        ? ?/sec
or_sliced     1.00   1225.5±2.12ns        ? ?/sec    1.00   1226.9±7.43ns        ? ?/sec

What changes are included in this PR?

  1. Change the array size to 8192 to better match typical sizes used
  2. Run each kernel 100 times per criterion iteration to reduce noise

Are these changes tested?

I will benchmark then

Are there any user-facing changes?

No these are benchmarks

@github-actions github-actions bot added the arrow Changes to the arrow crate label Nov 19, 2025
const RUNS_PER_SAMPLE: usize = 1_000;

fn bitwise_array_benchmark(c: &mut Criterion) {
let size = 64 * 1024_usize;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We often run these kernels on 8k elements, not 64k elements, so adjust the benchmark to reflect that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arrow Changes to the arrow crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant