-
Notifications
You must be signed in to change notification settings - Fork 224
Speedup scalar boolean operations #546
Speedup scalar boolean operations #546
Conversation
@@ -40,7 +40,7 @@ fn add_benchmark(c: &mut Criterion) { | |||
b.iter(|| bench_op(&arr_a, &arr_b, Operator::Eq)) | |||
}); | |||
c.bench_function(&format!("bool scalar 2^{}", log2_size), |b| { | |||
b.iter(|| bench_op_scalar(&arr_a, &BooleanScalar::from(Some(true)), Operator::Eq)) | |||
b.iter(|| bench_op_scalar(&arr_a, &BooleanScalar::from(Some(false)), Operator::Eq)) |
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.
Otherwise the benchmark measures lhs.clone()
which doesn't increase with size - and is way faster (>20000x)
@jorgecarleitao any reason the code works at |
Codecov Report
@@ Coverage Diff @@
## main #546 +/- ##
==========================================
+ Coverage 81.25% 81.32% +0.06%
==========================================
Files 380 380
Lines 23376 23414 +38
==========================================
+ Hits 18995 19042 +47
+ Misses 4381 4372 -9
Continue to review full report at Codecov.
|
No idea why the |
Thanks a lot, @Dandandan ! |
Ok, I still wonder - maybe I run some tests and compare with the same operations in arrow. I'm assuming operating on 64 bits at a time would be faster. |
By simplifying some code (20-25%) faster.