Skip to content

Conversation

@adriangb
Copy link
Contributor

Closes #18824

@adriangb adriangb requested a review from Copilot November 20, 2025 00:07
@github-actions github-actions bot added the physical-expr Changes to the physical-expr crates label Nov 20, 2025
Copilot finished reviewing on behalf of adriangb November 20, 2025 00:11
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds specialized StaticFilter implementations for common scalar types to optimize IN LIST operations in DataFusion. Previously, only Int32 had a specialized filter; now Int8, Int16, Int64, UInt8, UInt16, UInt32, UInt64, Boolean, Utf8, LargeUtf8, Utf8View, Binary, LargeBinary, and BinaryView all have optimized implementations.

Key changes:

  • Introduced two macros (primitive_static_filter! and define_static_filter!) to generate specialized filter implementations, eliminating code duplication
  • Extended instantiate_static_filter to route 15 additional data types to their specialized implementations
  • Refactored the in_list function to use instantiate_static_filter instead of defaulting to the generic ArrayStaticFilter

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@adriangb
Copy link
Contributor Author

@alamb maybe let's run benchmarks?

@adriangb
Copy link
Contributor Author

Here's what I'm seeing so far:

Function & State main (us) specialized (us) Change
in_list_utf8(5) (1024, 0) IN (1, 0) 3.6205 4.8594 Regressed (+34.239%)
in_list_utf8(10) (1024, 0) IN (1, 0) 3.6363 5.1001 Regressed (+40.312%)
in_list_utf8(20) (1024, 0) IN (1, 0) 3.6707 4.9045 Regressed (+33.600%)
in_list_f32 (1024, 0) IN (1, 0) 3.5255 3.2288 Improved (−8.2971%)
in_list_i32 (1024, 0) IN (1, 0) 3.4923 3.6403 Regressed (+3.8772%)
in_list_utf8(5) (1024, 0.2) IN (1, 0) 4.9284 6.3583 Regressed (+29.002%)
in_list_utf8(10) (1024, 0.2) IN (1, 0) 4.9788 6.3273 Regressed (+27.064%)
in_list_utf8(20) (1024, 0.2) IN (1, 0) 5.1145 6.4905 Regressed (+26.907%)
in_list_f32 (1024, 0.2) IN (1, 0) 4.4894 4.2540 Improved (−5.2512%)
in_list_i32 (1024, 0.2) IN (1, 0) 4.4055 4.2869 Improved (−2.7526%)
in_list_utf8(5) (1024, 0) IN (3, 0) 3.5576 4.8733 Regressed (+37.000%)
in_list_utf8(10) (1024, 0) IN (3, 0) 3.4999 4.8737 Regressed (+37.108%)
in_list_utf8(20) (1024, 0) IN (3, 0) 3.4897 4.9039 Regressed (+40.449%)
in_list_f32 (1024, 0) IN (3, 0) 3.5114 3.2550 Improved (−7.3270%)
in_list_i32 (1024, 0) IN (3, 0) 3.5199 3.4879 Noise Threshold (−0.9158%)
in_list_utf8(5) (1024, 0.2) IN (3, 0) 5.0196 6.2232 Regressed (+23.865%)
in_list_utf8(10) (1024, 0.2) IN (3, 0) 5.0453 6.5280 Regressed (+28.004%)
in_list_utf8(20) (1024, 0.2) IN (3, 0) 5.1005 11.124 Regressed (+118.13%)
in_list_f32 (1024, 0.2) IN (3, 0) 4.5049 4.3126 Improved (−4.6367%)
in_list_i32 (1024, 0.2) IN (3, 0) 4.4026 4.4424 Noise Threshold (+1.0449%)
in_list_utf8(5) (1024, 0) IN (10, 0) 3.5275 4.9709 Regressed (+40.969%)
in_list_utf8(10) (1024, 0) IN (10, 0) 3.5613 4.9125 Regressed (+37.386%)
in_list_utf8(20) (1024, 0) IN (10, 0) 3.5589 4.8611 Regressed (+36.578%)
in_list_f32 (1024, 0) IN (10, 0) 3.5596 3.2017 Improved (−10.003%)
in_list_i32 (1024, 0) IN (10, 0) 3.4917 3.5190 Noise Threshold (+1.0216%)
in_list_utf8(5) (1024, 0.2) IN (10, 0) 5.0368 6.6162 Regressed (+31.725%)
in_list_utf8(10) (1024, 0.2) IN (10, 0) 5.0980 6.6660 Regressed (+30.039%)
in_list_utf8(20) (1024, 0.2) IN (10, 0) 5.2543 6.5350 Regressed (+24.335%)
in_list_f32 (1024, 0.2) IN (10, 0) 4.5609 4.3248 Improved (−5.3746%)
in_list_i32 (1024, 0.2) IN (10, 0) 4.4460 4.3543 Improved (−2.7754%)
in_list_utf8(5) (1024, 0) IN (100, 0) 3.6542 4.9992 Regressed (+36.952%)
in_list_utf8(10) (1024, 0) IN (100, 0) 3.6529 4.8772 Regressed (+33.560%)
in_list_utf8(20) (1024, 0) IN (100, 0) 3.6155 5.0250 Regressed (+39.127%)
in_list_f32 (1024, 0) IN (100, 0) 3.6029 3.2448 Improved (−9.7603%)
in_list_i32 (1024, 0) IN (100, 0) 3.6048 3.4770 Improved (−3.5307%)
in_list_utf8(5) (1024, 0.2) IN (100, 0) 5.3988 6.6108 Regressed (+22.866%)
in_list_utf8(10) (1024, 0.2) IN (100, 0) 5.4776 6.6567 Regressed (+21.591%)
in_list_utf8(20) (1024, 0.2) IN (100, 0) 5.3721 6.6470 Regressed (+24.058%)
in_list_f32 (1024, 0.2) IN (100, 0) 4.7693 4.3281 Improved (−9.9814%)
in_list_i32 (1024, 0.2) IN (100, 0) 4.5402 4.4076 Improved (−3.5247%)

I think we'd need to add benchmarks for other primitive types.
And it's interesting that Utf8 regresses a lot across the board. I guess the benefits of vectorization / computing the entire hashes at once outweighs the dynamic dispatch?

@adriangb
Copy link
Contributor Author

Thinking about it the trick is probably to avoid the extra to_string()/to_vec() allocation and store just the hashes. Will look into that.

Copy link
Member

@martin-g martin-g left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!
Just some nits.

}
(false, false, false) => {
// no nulls anywhere, not negated
BooleanArray::from_iter(
Copy link
Contributor

@Dandandan Dandandan Nov 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BooleanBuffer::collect_bool is faster

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you I know you or some other reviewer had pointed this out to me before. I am making a mental note to try to not forget again and keep an eye out for it. Thanks for you patience.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do wonder why we don't have faster high-level APIs if this is really important. E.g. BooleanArray::new_false, BooleanArray::new_nulls, BooleanArray::new_true and BooleanArray::collect_bool(size, iterator) or something like that.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alamb

This comment was marked as off-topic.

@alamb

This comment was marked as off-topic.

@alamb
Copy link
Contributor

alamb commented Nov 22, 2025

🤖 ./gh_compare_branch_bench.sh Benchmark Script Running
Linux aal-dev 6.14.0-1018-gcp #19~24.04.1-Ubuntu SMP Wed Sep 24 23:23:09 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
Comparing specialize (1e4782f) to 7d8b860 diff
BENCH_NAME=in_list
BENCH_COMMAND=cargo bench --bench in_list
BENCH_FILTER=
BENCH_BRANCH_NAME=specialize
Results will be posted here when complete

@alamb
Copy link
Contributor

alamb commented Nov 22, 2025

🤖: Benchmark completed

Details

group                                       main                                   specialize
-----                                       ----                                   ----------
in_list_f32 (1024, 0) IN (1, 0)             1.16      4.2±0.01µs        ? ?/sec    1.00      3.6±0.02µs        ? ?/sec
in_list_f32 (1024, 0) IN (10, 0)            1.16      4.2±0.01µs        ? ?/sec    1.00      3.6±0.02µs        ? ?/sec
in_list_f32 (1024, 0) IN (100, 0)           1.16      4.3±0.01µs        ? ?/sec    1.00      3.7±0.01µs        ? ?/sec
in_list_f32 (1024, 0) IN (3, 0)             1.17      4.3±0.10µs        ? ?/sec    1.00      3.6±0.01µs        ? ?/sec
in_list_f32 (1024, 0.2) IN (1, 0)           1.00      5.1±0.02µs        ? ?/sec    1.13      5.8±0.07µs        ? ?/sec
in_list_f32 (1024, 0.2) IN (10, 0)          1.00      5.3±0.03µs        ? ?/sec    1.09      5.7±0.02µs        ? ?/sec
in_list_f32 (1024, 0.2) IN (100, 0)         1.00      5.3±0.04µs        ? ?/sec    1.13      5.9±0.10µs        ? ?/sec
in_list_f32 (1024, 0.2) IN (3, 0)           1.00      5.2±0.04µs        ? ?/sec    1.12      5.8±0.05µs        ? ?/sec
in_list_i32 (1024, 0) IN (1, 0)             1.00      4.3±0.01µs        ? ?/sec    1.11      4.7±0.02µs        ? ?/sec
in_list_i32 (1024, 0) IN (10, 0)            1.00      4.2±0.01µs        ? ?/sec    1.11      4.7±0.04µs        ? ?/sec
in_list_i32 (1024, 0) IN (100, 0)           1.00      4.3±0.01µs        ? ?/sec    1.11      4.7±0.01µs        ? ?/sec
in_list_i32 (1024, 0) IN (3, 0)             1.00      4.3±0.01µs        ? ?/sec    1.11      4.7±0.07µs        ? ?/sec
in_list_i32 (1024, 0.2) IN (1, 0)           1.00      5.2±0.02µs        ? ?/sec    1.32      6.8±0.39µs        ? ?/sec
in_list_i32 (1024, 0.2) IN (10, 0)          1.00      5.2±0.02µs        ? ?/sec    1.25      6.5±0.03µs        ? ?/sec
in_list_i32 (1024, 0.2) IN (100, 0)         1.00      5.2±0.03µs        ? ?/sec    1.16      6.1±0.06µs        ? ?/sec
in_list_i32 (1024, 0.2) IN (3, 0)           1.00      5.2±0.02µs        ? ?/sec    1.30      6.8±0.03µs        ? ?/sec
in_list_utf8(10) (1024, 0) IN (1, 0)        1.16      4.5±0.02µs        ? ?/sec    1.00      3.9±0.01µs        ? ?/sec
in_list_utf8(10) (1024, 0) IN (10, 0)       1.16      4.5±0.01µs        ? ?/sec    1.00      3.9±0.01µs        ? ?/sec
in_list_utf8(10) (1024, 0) IN (100, 0)      1.16      4.5±0.03µs        ? ?/sec    1.00      3.9±0.01µs        ? ?/sec
in_list_utf8(10) (1024, 0) IN (3, 0)        1.16      4.5±0.04µs        ? ?/sec    1.00      3.9±0.01µs        ? ?/sec
in_list_utf8(10) (1024, 0.2) IN (1, 0)      1.06      5.9±0.03µs        ? ?/sec    1.00      5.6±0.04µs        ? ?/sec
in_list_utf8(10) (1024, 0.2) IN (10, 0)     1.09      6.0±0.06µs        ? ?/sec    1.00      5.5±0.03µs        ? ?/sec
in_list_utf8(10) (1024, 0.2) IN (100, 0)    1.07      6.0±0.03µs        ? ?/sec    1.00      5.6±0.03µs        ? ?/sec
in_list_utf8(10) (1024, 0.2) IN (3, 0)      1.10      6.1±0.04µs        ? ?/sec    1.00      5.6±0.03µs        ? ?/sec
in_list_utf8(20) (1024, 0) IN (1, 0)        1.16      4.5±0.02µs        ? ?/sec    1.00      3.9±0.01µs        ? ?/sec
in_list_utf8(20) (1024, 0) IN (10, 0)       1.16      4.5±0.01µs        ? ?/sec    1.00      3.9±0.01µs        ? ?/sec
in_list_utf8(20) (1024, 0) IN (100, 0)      1.15      4.5±0.04µs        ? ?/sec    1.00      3.9±0.03µs        ? ?/sec
in_list_utf8(20) (1024, 0) IN (3, 0)        1.14      4.6±0.01µs        ? ?/sec    1.00      4.0±0.03µs        ? ?/sec
in_list_utf8(20) (1024, 0.2) IN (1, 0)      1.06      6.0±0.02µs        ? ?/sec    1.00      5.7±0.03µs        ? ?/sec
in_list_utf8(20) (1024, 0.2) IN (10, 0)     1.07      6.0±0.03µs        ? ?/sec    1.00      5.6±0.03µs        ? ?/sec
in_list_utf8(20) (1024, 0.2) IN (100, 0)    1.09      6.1±0.03µs        ? ?/sec    1.00      5.6±0.02µs        ? ?/sec
in_list_utf8(20) (1024, 0.2) IN (3, 0)      1.04      6.1±0.03µs        ? ?/sec    1.00      5.8±0.05µs        ? ?/sec
in_list_utf8(5) (1024, 0) IN (1, 0)         1.15      4.5±0.01µs        ? ?/sec    1.00      4.0±0.01µs        ? ?/sec
in_list_utf8(5) (1024, 0) IN (10, 0)        1.16      4.5±0.03µs        ? ?/sec    1.00      3.9±0.01µs        ? ?/sec
in_list_utf8(5) (1024, 0) IN (100, 0)       1.16      4.5±0.01µs        ? ?/sec    1.00      3.9±0.00µs        ? ?/sec
in_list_utf8(5) (1024, 0) IN (3, 0)         1.14      4.5±0.03µs        ? ?/sec    1.00      4.0±0.02µs        ? ?/sec
in_list_utf8(5) (1024, 0.2) IN (1, 0)       1.06      5.9±0.04µs        ? ?/sec    1.00      5.5±0.04µs        ? ?/sec
in_list_utf8(5) (1024, 0.2) IN (10, 0)      1.10      6.1±0.04µs        ? ?/sec    1.00      5.5±0.03µs        ? ?/sec
in_list_utf8(5) (1024, 0.2) IN (100, 0)     1.11      6.0±0.03µs        ? ?/sec    1.00      5.4±0.03µs        ? ?/sec
in_list_utf8(5) (1024, 0.2) IN (3, 0)       1.11      6.1±0.06µs        ? ?/sec    1.00      5.5±0.04µs        ? ?/sec

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @adriangb -- this seems like an improvement to me

It would be nice if we could reduce some of the duplication in the tests, but I don't think that is a deal breaker 👍

I do think we should cover the no null cases with tests

Do you also plan to make special InList implementation for Utf8/Utf8View/LargeUtf8?

}

#[test]
fn in_list_int8() -> Result<()> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we please reduce the duplication in tests here? It seems like we there are like 16 copies of the same test

Reducing the duplication will make it easier to understand what is being covered

BooleanArray::new(builder.finish(), None)
}
(false, false, true) => {
let values = v.values();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code appears to be uncovered by tests. I tested using

cargo llvm-cov test --html -p datafusion-physical-expr --lib -- in_lis
Image

Here is the whole report in case that is useful llvm-cov.zip

}
fn contains(&self, v: &dyn Array, negated: bool) -> Result<BooleanArray> {
// Handle dictionary arrays by recursing on the values
downcast_dictionary_array! {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't see any tests for dictionaries 🤔

}
(false, false, false) => {
// no nulls anywhere, not negated
BooleanArray::from_iter(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

}

#[test]
fn in_list_utf8_view() -> Result<()> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this PR has tests for utf8 but no changes for those types. Is that your intention?

}
(true, _, true) | (false, true, true) => {
// Either needle or haystack has nulls, negated
BooleanArray::from_iter(v.iter().map(|value| {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It probably would be faster to handle the nulls separately or using set_indices rather than using BooleanArray::from_iter and v.iter etc.

let values = v.values();
let mut builder = BooleanBufferBuilder::new(values.len());
for value in values.iter() {
builder.append(self.values.contains(value));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This unfortunately is slower than collect_bool. I see there is some good discussion on better APIs on apache/arrow-rs#8561

Copy link
Contributor

@Dandandan Dandandan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice to get some performance back.

@Dandandan
Copy link
Contributor

Dandandan commented Nov 23, 2025

🤖: Benchmark completed

Details

group                                       main                                   specialize
-----                                       ----                                   ----------
in_list_f32 (1024, 0) IN (1, 0)             1.16      4.2±0.01µs        ? ?/sec    1.00      3.6±0.02µs        ? ?/sec
in_list_f32 (1024, 0) IN (10, 0)            1.16      4.2±0.01µs        ? ?/sec    1.00      3.6±0.02µs        ? ?/sec
in_list_f32 (1024, 0) IN (100, 0)           1.16      4.3±0.01µs        ? ?/sec    1.00      3.7±0.01µs        ? ?/sec
in_list_f32 (1024, 0) IN (3, 0)             1.17      4.3±0.10µs        ? ?/sec    1.00      3.6±0.01µs        ? ?/sec
in_list_f32 (1024, 0.2) IN (1, 0)           1.00      5.1±0.02µs        ? ?/sec    1.13      5.8±0.07µs        ? ?/sec
in_list_f32 (1024, 0.2) IN (10, 0)          1.00      5.3±0.03µs        ? ?/sec    1.09      5.7±0.02µs        ? ?/sec
in_list_f32 (1024, 0.2) IN (100, 0)         1.00      5.3±0.04µs        ? ?/sec    1.13      5.9±0.10µs        ? ?/sec
in_list_f32 (1024, 0.2) IN (3, 0)           1.00      5.2±0.04µs        ? ?/sec    1.12      5.8±0.05µs        ? ?/sec
in_list_i32 (1024, 0) IN (1, 0)             1.00      4.3±0.01µs        ? ?/sec    1.11      4.7±0.02µs        ? ?/sec
in_list_i32 (1024, 0) IN (10, 0)            1.00      4.2±0.01µs        ? ?/sec    1.11      4.7±0.04µs        ? ?/sec
in_list_i32 (1024, 0) IN (100, 0)           1.00      4.3±0.01µs        ? ?/sec    1.11      4.7±0.01µs        ? ?/sec
in_list_i32 (1024, 0) IN (3, 0)             1.00      4.3±0.01µs        ? ?/sec    1.11      4.7±0.07µs        ? ?/sec
in_list_i32 (1024, 0.2) IN (1, 0)           1.00      5.2±0.02µs        ? ?/sec    1.32      6.8±0.39µs        ? ?/sec
in_list_i32 (1024, 0.2) IN (10, 0)          1.00      5.2±0.02µs        ? ?/sec    1.25      6.5±0.03µs        ? ?/sec
in_list_i32 (1024, 0.2) IN (100, 0)         1.00      5.2±0.03µs        ? ?/sec    1.16      6.1±0.06µs        ? ?/sec
in_list_i32 (1024, 0.2) IN (3, 0)           1.00      5.2±0.02µs        ? ?/sec    1.30      6.8±0.03µs        ? ?/sec
in_list_utf8(10) (1024, 0) IN (1, 0)        1.16      4.5±0.02µs        ? ?/sec    1.00      3.9±0.01µs        ? ?/sec
in_list_utf8(10) (1024, 0) IN (10, 0)       1.16      4.5±0.01µs        ? ?/sec    1.00      3.9±0.01µs        ? ?/sec
in_list_utf8(10) (1024, 0) IN (100, 0)      1.16      4.5±0.03µs        ? ?/sec    1.00      3.9±0.01µs        ? ?/sec
in_list_utf8(10) (1024, 0) IN (3, 0)        1.16      4.5±0.04µs        ? ?/sec    1.00      3.9±0.01µs        ? ?/sec
in_list_utf8(10) (1024, 0.2) IN (1, 0)      1.06      5.9±0.03µs        ? ?/sec    1.00      5.6±0.04µs        ? ?/sec
in_list_utf8(10) (1024, 0.2) IN (10, 0)     1.09      6.0±0.06µs        ? ?/sec    1.00      5.5±0.03µs        ? ?/sec
in_list_utf8(10) (1024, 0.2) IN (100, 0)    1.07      6.0±0.03µs        ? ?/sec    1.00      5.6±0.03µs        ? ?/sec
in_list_utf8(10) (1024, 0.2) IN (3, 0)      1.10      6.1±0.04µs        ? ?/sec    1.00      5.6±0.03µs        ? ?/sec
in_list_utf8(20) (1024, 0) IN (1, 0)        1.16      4.5±0.02µs        ? ?/sec    1.00      3.9±0.01µs        ? ?/sec
in_list_utf8(20) (1024, 0) IN (10, 0)       1.16      4.5±0.01µs        ? ?/sec    1.00      3.9±0.01µs        ? ?/sec
in_list_utf8(20) (1024, 0) IN (100, 0)      1.15      4.5±0.04µs        ? ?/sec    1.00      3.9±0.03µs        ? ?/sec
in_list_utf8(20) (1024, 0) IN (3, 0)        1.14      4.6±0.01µs        ? ?/sec    1.00      4.0±0.03µs        ? ?/sec
in_list_utf8(20) (1024, 0.2) IN (1, 0)      1.06      6.0±0.02µs        ? ?/sec    1.00      5.7±0.03µs        ? ?/sec
in_list_utf8(20) (1024, 0.2) IN (10, 0)     1.07      6.0±0.03µs        ? ?/sec    1.00      5.6±0.03µs        ? ?/sec
in_list_utf8(20) (1024, 0.2) IN (100, 0)    1.09      6.1±0.03µs        ? ?/sec    1.00      5.6±0.02µs        ? ?/sec
in_list_utf8(20) (1024, 0.2) IN (3, 0)      1.04      6.1±0.03µs        ? ?/sec    1.00      5.8±0.05µs        ? ?/sec
in_list_utf8(5) (1024, 0) IN (1, 0)         1.15      4.5±0.01µs        ? ?/sec    1.00      4.0±0.01µs        ? ?/sec
in_list_utf8(5) (1024, 0) IN (10, 0)        1.16      4.5±0.03µs        ? ?/sec    1.00      3.9±0.01µs        ? ?/sec
in_list_utf8(5) (1024, 0) IN (100, 0)       1.16      4.5±0.01µs        ? ?/sec    1.00      3.9±0.00µs        ? ?/sec
in_list_utf8(5) (1024, 0) IN (3, 0)         1.14      4.5±0.03µs        ? ?/sec    1.00      4.0±0.02µs        ? ?/sec
in_list_utf8(5) (1024, 0.2) IN (1, 0)       1.06      5.9±0.04µs        ? ?/sec    1.00      5.5±0.04µs        ? ?/sec
in_list_utf8(5) (1024, 0.2) IN (10, 0)      1.10      6.1±0.04µs        ? ?/sec    1.00      5.5±0.03µs        ? ?/sec
in_list_utf8(5) (1024, 0.2) IN (100, 0)     1.11      6.0±0.03µs        ? ?/sec    1.00      5.4±0.03µs        ? ?/sec
in_list_utf8(5) (1024, 0.2) IN (3, 0)       1.11      6.1±0.06µs        ? ?/sec    1.00      5.5±0.04µs        ? ?/sec

Results seem a bit mixed?

@adriangb
Copy link
Contributor Author

Yes. Slowdowns for i32 are concerning. I won’t merge this until it’s all speedups or neutral. I may also make a support PR to add more benchmarks for other types so we can make better comparisons.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

physical-expr Changes to the physical-expr crates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Restore IN_LIST performance -- Implement specialized StaticFilters for different data types

4 participants