-
Notifications
You must be signed in to change notification settings - Fork 224
Simplified min_max_string
and min_max_binary
#1004
Simplified min_max_string
and min_max_binary
#1004
Conversation
Signed-off-by: remzi <[email protected]>
Codecov Report
@@ Coverage Diff @@
## main #1004 +/- ##
==========================================
+ Coverage 71.42% 71.45% +0.02%
==========================================
Files 356 356
Lines 19784 19752 -32
==========================================
- Hits 14131 14113 -18
+ Misses 5653 5639 -14
Continue to review full report at Codecov.
|
Signed-off-by: remzi <[email protected]>
Signed-off-by: remzi <[email protected]>
Signed-off-by: remzi <[email protected]>
Signed-off-by: remzi <[email protected]>
min_max_string
min_max_string
and min_max_binary
@@ -42,6 +42,18 @@ fn add_benchmark(c: &mut Criterion) { | |||
c.bench_function(&format!("min null 2^{} f32", log2_size), |b| { | |||
b.iter(|| bench_min(&arr_a)) | |||
}); | |||
|
|||
let arr_a = create_string_array::<i32>(1, size, 0.0, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I set the length of each string to be 1 to make the time of comparing each element to be determined.
min_max_string
and min_max_binary
min_max_string
and min_max_binary
Thanks a lot for this PR. I went through this and also ran the benches on main vs this PR with different string lengths and array lengths and the performance is equivalent on my machine. Given that this is less code and more tested, we ship it :) |
Signed-off-by: remzi [email protected]
Changes in the PR
fold
withreduce
no null
cases.min utf8
No obvious performance impact