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

   # Which issue does this PR close?
   
   Part of #10795. Adds benchmark coverage ahead of #11302.
   
   # Rationale for this change
   
   The existing float-to-decimal benchmarks cover safe Float64-to-Decimal128 
casts with valid and non-finite inputs. They do not isolate Float32 conversion, 
successful strict casts, Decimal256 conversion, or target-precision overflow, 
paths affected by sharing checked float-to-decimal conversion between Arrow and 
Variant in #11302.
   
   # What changes are included in this PR?
   
   Add five benchmarks selected for distinct conversion paths:
   
   - Float32 to Decimal32 in safe and strict mode.
   - Float64 to Decimal128 in strict mode, complementing the existing safe case.
   - Float64 to Decimal256 with a negative scale, exercising its separate 
float-to-i256 conversion.
   - Precision overflow in safe mode, combining direct and rounding-induced 
overflow while processing the whole array.
   
   Fixtures contain 8192 rows with approximately 10% nulls. Fixture 
construction and output type, length, and null-count checks run outside the 
timed loop. Use the existing `add_benchmark` and individual `bench_function` 
calls, following #11313.
   
   # Are these changes tested?
   
   - All five benchmark smoke cases pass on upstream main (`26de48deaf`) and 
#11302 (`15aeeb8098`).
   - `cargo +1.98.1 fmt --all -- --check`.
   - `cargo +1.98.1 clippy -p arrow --bench cast_kernels --features test_utils 
--no-deps -- -D warnings` passes, with the existing unknown 
`clippy::assert_is_empty` lint warning. Checking dependencies also encounters 
an existing `clippy::chunks_exact_to_as_chunks` lint in `arrow-row`.
   - Ran the same benchmarks on main and #11302 using Rust 1.98.1, identical 
dependencies, and CPU affinity. Each revision was measured twice in main / PR / 
PR / main order, with 50 samples, a one-second warmup, and a two-second 
measurement per case.
   
   # Are there any user-facing changes?
   
   No. Benchmark additions only.
   
   # AI usage
   
   Developed with assistance from OpenAI Codex for the benchmarks, validation, 
and PR description.
   


-- 
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