sdf-jkl opened a new pull request, #11578:
URL: https://github.com/apache/arrow-rs/pull/11578

   # Rationale for this change
   
   Repeated benchmark-bot runs can report materially different timings for 
unchanged code. This PR evaluates mimalloc in three Arrow benchmark targets: 
`coalesce_kernels`, `filter_kernels`, and `json_writer`.
   
   Two recent `coalesce_kernels` reports from #11174 used the same base and 
changed commit SHAs, `BENCH_FILTER: take`, and one shard:
   
   - [Earlier 
report](https://github.com/apache/arrow-rs/pull/11174#issuecomment-6180161846)
   - [Later 
report](https://github.com/apache/arrow-rs/pull/11174#issuecomment-6180183900)
   
   For `take: mixed_binaryview (max_string_len=128), 8192, nulls: 0, 
selectivity: 0.1`, the unchanged baseline measured 4.5 ms in one run and 2.8 ms 
in the other. Across all 130 matching cases, the baseline's median absolute 
change was approximately 1.85%, p95 40.80%, and p99 44.63%. The changed commit 
also varied: median 4.75%, p95 41.37%, and p99 46.97%. These figures are 
calculated from the rounded values in the reports, using `100 * abs(later / 
earlier - 1)`.
   
   This motivates a repeatability experiment; it does not establish an 
allocator-related cause. `filter_kernels` and `json_writer` broaden the 
experiment to filtering and serialization, and showed potential improvements in 
the partial local allocator comparison. Those local results are exploratory: 
the system runs were farther apart in time than the mimalloc runs.
   
   Related to #11460, which applies mimalloc to `arrow_writer`.
   
   # What changes are included in this PR?
   
   Use `mimalloc::MiMalloc` as the global allocator, without an 
operating-system gate, in:
   
   - `arrow/benches/coalesce_kernels.rs`
   - `arrow/benches/filter_kernels.rs`
   - `arrow/benches/json_writer.rs`
   - `arrow-json/benches/json_writer.rs`
   
   The bot's `json_writer` target runs both JSON writer executables, so both 
use the same allocator. Add mimalloc as a development dependency to the two 
packages. Benchmark inputs, case order, and Criterion settings are unchanged.
   
   # Are these changes tested?
   
   Formatting, spelling, and locked dependency resolution pass locally. 
Compilation and runtime validation are left to CI and the benchmark bot to 
avoid competing with an ongoing local benchmark comparison. No new tests are 
added because the existing benchmark cases exercise the allocator change. 
Benchmark results are pending. The planned bot experiment compares the pinned 
PR base to itself and the pinned mimalloc commit to itself, using the same 
three targets and one shard per target. We will report median, p95, and p99 
absolute timing changes and counts above 5% and 10%, separately for each target 
and across matched cases. These are percentiles across benchmark cases, not 
operation-latency percentiles or estimates of statistical variance.
   
   The initial two requests are a first repeatability check. Additional paired 
requests should use the same pinned commits and alternate the allocator request 
order before drawing conclusions about stability.
   
   # Are there any significant user-facing changes?
   
   None. Allocator selection changes only in the selected benchmark executables.
   
   AI assistance was used for the allocator declarations, dependency updates, 
PR description, and benchmark comparison plan.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to