This is an automated email from the ASF dual-hosted git repository.

Jefffrey pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-rs.git


The following commit(s) were added to refs/heads/main by this push:
     new f4a0f224a7 chore[benches]: add REE interleave benchmarks (#9849)
f4a0f224a7 is described below

commit f4a0f224a7bce30ca2cccb6ebcf13ebd3026173d
Author: Alfonso Subiotto Marqués <[email protected]>
AuthorDate: Tue May 5 07:30:58 2026 +0200

    chore[benches]: add REE interleave benchmarks (#9849)
    
    In preparation for a specialized interleave kernel.
    
    # Which issue does this PR close?
    
    <!--
    We generally require a GitHub issue to be filed for all bug fixes and
    enhancements and this helps us generate change logs for our releases.
    You can link an issue to this PR using the GitHub syntax.
    -->
    
    - No issue needed: benchmark addition
    
    # Rationale for this change
    
    <!--
    Why are you proposing this change? If this is already explained clearly
    in the issue then this section is not needed.
    Explaining clearly why changes are proposed helps reviewers understand
    your changes and offer better suggestions for fixes.
    -->
    I want to open a subsequent PR adding the specialized REE interleave
    kernel.
    
    # What changes are included in this PR?
    
    <!--
    There is no need to duplicate the description in the issue here but it
    is sometimes worth providing a summary of the individual changes in this
    PR.
    -->
    Benchmarks
    
    # Are these changes tested?
    
    <!--
    We typically require tests for all PRs in order to:
    1. Prevent the code from being accidentally broken by subsequent changes
    2. Serve as another way to document the expected behavior of the code
    
    If tests are not included in your PR, please explain why (for example,
    are they covered by existing tests)?
    -->
    Not necessary
    
    # Are there any user-facing changes?
    
    <!--
    If there are user-facing changes then we may require documentation to be
    updated before approving the PR.
    
    If there are any breaking changes to public APIs, please call them out.
    -->
    No
    
    Signed-off-by: Alfonso Subiotto Marques <[email protected]>
---
 arrow/benches/interleave_kernels.rs | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arrow/benches/interleave_kernels.rs 
b/arrow/benches/interleave_kernels.rs
index 0688bb79ad..4c4f5364ff 100644
--- a/arrow/benches/interleave_kernels.rs
+++ b/arrow/benches/interleave_kernels.rs
@@ -150,6 +150,14 @@ fn add_benchmark(c: &mut Criterion) {
         )
     };
 
+    let ree_run_ends = Int32Array::from_iter_values((1..=64).map(|i| i * 16));
+    let ree_i64_values = create_primitive_array::<Int64Type>(64, 0.0);
+    let ree_i64 = RunArray::<Int32Type>::try_new(&ree_run_ends, 
&ree_i64_values).unwrap();
+
+    let dict_str_values = create_string_array_with_len::<i32>(20, 0.0, 12);
+    let dict_for_ree = create_dict_from_values::<UInt32Type>(64, 0.0, 
&dict_str_values);
+    let ree_dict = RunArray::<Int32Type>::try_new(&ree_run_ends, 
&dict_for_ree).unwrap();
+
     let cases: &[(&str, &dyn Array)] = &[
         ("i32(0.0)", &i32),
         ("i32(0.5)", &i32_opt),
@@ -175,6 +183,8 @@ fn add_benchmark(c: &mut Criterion) {
         ("list_view<i64>(0.1,0.1,20)", &list_view_i64),
         ("list_view<i64>(0.0,0.0,20)", &list_view_i64_no_nulls),
         ("list_view_overlapping<i64>(80x,20)", &list_view_overlapping),
+        ("ree_i32<i64>(64 runs)", &ree_i64),
+        ("ree_i32<dict<u32,utf8>>(64 runs)", &ree_dict),
     ];
 
     for (prefix, base) in cases {

Reply via email to