mbutrovich commented on code in PR #12232:
URL: https://github.com/apache/arrow-rs/pull/12232#discussion_r4564712927
##########
arrow-buffer/benches/divisor.rs:
##########
@@ -57,11 +59,73 @@ macro_rules! bench_divisor {
}};
}
+/// Divides `SIZE` values by a divisor of each variant and by a power of ten
that a decimal kernel
+/// divides by, with `/` and `%`, and with the divisor type. `full` values use
every bit, and
+/// `narrow` values fit in the next narrower type, where `/` and `%` take a
faster path. `new`
+/// builds one divisor, which a kernel does once per batch
+macro_rules! bench_wide {
Review Comment:
`bench_divisor!` draws values with `rng.random()` and divides by literals,
which `i256` doesn't support. `bench_wide!` takes closures for the values
instead. It also runs each divisor on values that fit in the next narrower
type, where `/`, `%` and `i256::wrapping_div_rem` take a faster path, which
shows where a kernel should divide with the narrower divisor. The `new` cases
measure building one divisor, which a kernel does once per batch.
--
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]