mkleen commented on code in PR #8988:
URL: https://github.com/apache/arrow-rs/pull/8988#discussion_r2620890779
##########
arrow/benches/zip_kernels.rs:
##########
@@ -224,6 +223,74 @@ fn bench_zip_input_on_all_masks(
}
}
+fn bench_zip_on_string_view_scalar(c: &mut Criterion, input_generator:
&GenerateStringView) {
+ bench_zip_on_string_view_scalars(c, input_generator, input_generator);
+}
+
+fn bench_zip_on_string_view_scalars(
+ c: &mut Criterion,
+ input_generator_1: &GenerateStringView,
+ input_generator_2: &GenerateStringView,
+) {
+ let mut group = c.benchmark_group(
+ format!(
+ "zip_{ARRAY_LEN}_from_{} and {}",
+ input_generator_1.name(),
+ input_generator_2.name()
+ )
+ .as_str(),
+ );
+
+ let null_scalar = input_generator_1.generate_null();
+
+ let non_null_scalar_1 = input_generator_1.generate();
Review Comment:
I just double-checked the benchmarks from
https://github.com/apache/arrow-rs/pull/8653 (the original optimization) see
https://github.com/apache/arrow-rs/pull/8653#issuecomment-3453566126. The
optimisation only kicks in when both truthy and falsy are scalars, meaning
arrays with single rows. The array vs scalar case is not improved.
--
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]