Jefffrey commented on code in PR #11527:
URL: https://github.com/apache/arrow-rs/pull/11527#discussion_r4301972903


##########
arrow/benches/merge_kernels.rs:
##########
@@ -146,11 +168,39 @@ fn mask_cases(len: usize) -> Vec<(&'static str, 
BooleanArray)> {
     ]
 }
 
-fn bench_merge_on_input_generator(c: &mut Criterion, input_generator: &impl 
InputGenerator) {
+fn run_mask_cases(len: usize) -> Vec<(&'static str, BooleanArray)> {
+    [
+        ("runs_of_64_50pct_true", 0.5, 64.0),
+        ("runs_of_64_10pct_true", 0.1, 64.0),
+        ("runs_of_512_50pct_true", 0.5, 512.0),
+        ("runs_of_512_10pct_true", 0.1, 512.0),
+    ]
+    .into_iter()
+    .map(|(name, density, run)| (name, create_clustered_array(len, density, 
run, 7)))
+    .collect()
+}
+
+/// Which input combinations to run for a type.
+#[derive(PartialEq)]
+enum Scenarios {
+    All,
+    /// Only an array against a scalar, the CASE WHEN ... THEN expr ELSE 
literal shape.
+    ScalarSide,
+}
+
+fn bench_merge_on_input_generator(
+    c: &mut Criterion,
+    input_generator: &impl InputGenerator,
+    scenarios: Scenarios,
+) {
     const ARRAY_LEN: usize = 8192;
 
     let mut group =
         c.benchmark_group(format!("merge_{ARRAY_LEN}_from_{}", 
input_generator.name()).as_str());
+    // One merge of 8192 rows takes microseconds, so the default 3 s warm up

Review Comment:
   i wonder if we need to cut down the benches in this suite; similar to what 
we did for zip
   
   - https://github.com/apache/arrow-rs/pull/10919
   
   and/or reduce from 8192 to a smaller batch size 🤔 



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