From d143706b7fbd7b3e83b67fe7638cae27870a08a0 Mon Sep 17 00:00:00 2001 From: Onur Satici Date: Tue, 3 Dec 2024 16:34:39 +0000 Subject: [PATCH] wip: add stringview to interleave benchmark, comment out the rest --- arrow/benches/interleave_kernels.rs | 30 +++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/arrow/benches/interleave_kernels.rs b/arrow/benches/interleave_kernels.rs index 0941f1e3fd33..a6571e192329 100644 --- a/arrow/benches/interleave_kernels.rs +++ b/arrow/benches/interleave_kernels.rs @@ -72,17 +72,19 @@ fn add_benchmark(c: &mut Criterion) { let string_opt = create_string_array_with_len::(1024, 0.5, 20); let values = create_string_array_with_len::(10, 0.0, 20); let dict = create_dict_from_values::(1024, 0.0, &values); + let string_view = create_string_view_array_with_len(1024, 0.5, 50, true); let values = create_string_array_with_len::(1024, 0.0, 20); let sparse_dict = create_sparse_dict_from_values::(1024, 0.0, &values, 10..20); let cases: &[(&str, &dyn Array)] = &[ - ("i32(0.0)", &i32), - ("i32(0.5)", &i32_opt), - ("str(20, 0.0)", &string), - ("str(20, 0.5)", &string_opt), - ("dict(20, 0.0)", &dict), - ("dict_sparse(20, 0.0)", &sparse_dict), + // ("i32(0.0)", &i32), + // ("i32(0.5)", &i32_opt), + // ("str(20, 0.0)", &string), + // ("str(20, 0.5)", &string_opt), + // ("dict(20, 0.0)", &dict), + // ("dict_sparse(20, 0.0)", &sparse_dict), + ("string_view(0.5, 50, true)", &string_view), ]; for (prefix, base) in cases { @@ -98,14 +100,14 @@ fn add_benchmark(c: &mut Criterion) { } } - for len in [100, 1024, 2048] { - bench_values( - c, - &format!("interleave dict_distinct {len}"), - 100, - &[&dict, &sparse_dict], - ); - } + // for len in [100, 1024, 2048] { + // bench_values( + // c, + // &format!("interleave dict_distinct {len}"), + // 100, + // &[&dict, &sparse_dict], + // ); + // } } criterion_group!(benches, add_benchmark);