Optimize list_contains with prepared constant sets - #10052
robert3005 wants to merge 10 commits into
Conversation
8e24c7e to
f1eea0e
Compare
Merging this PR will regress 7 benchmarks
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | WallTime | dict_canonicalize_gt_u8_avx512[1000000] |
422.7 µs | 836.6 µs | -49.47% |
| ❌ | Simulation | optimize_lookup_predicate[ids=192, shape=in_list] |
49.9 µs | 75.9 µs | -34.2% |
| ❌ | Simulation | optimize_lookup_predicate[ids=128, shape=in_list] |
50.6 µs | 73.2 µs | -30.92% |
| ❌ | Simulation | optimize_lookup_predicate[ids=64, shape=in_list] |
50.4 µs | 70.6 µs | -28.6% |
| ❌ | Simulation | optimize_lookup_predicate[ids=16, shape=in_list] |
51.2 µs | 69.5 µs | -26.23% |
| ❌ | Simulation | optimize_lookup_predicate[ids=256, shape=in_list] |
79.1 µs | 105.3 µs | -24.9% |
| ❌ | Simulation | optimize_lookup_predicate[ids=1, shape=in_list] |
74.4 µs | 89.9 µs | -17.25% |
| ⚡ | Simulation | i64_random_chunked[256] |
20,802.2 µs | 232 µs | ×90 |
| ⚡ | Simulation | i64_random[256] |
5,685.6 µs | 134.9 µs | ×42 |
| ⚡ | Simulation | utf8_random[256] |
14,403.7 µs | 371.7 µs | ×39 |
| ⚡ | Simulation | nested_list_random[32] |
7.4 ms | 1 ms | ×7.2 |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing claude/friendly-knuth-dj6ed1-list-contains (77467d3) with rk/list-contains-benchmarks (27f94c1)
Footnotes
-
503 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩
f1eea0e to
ef75b12
Compare
ef75b12 to
f350f7b
Compare
|
How do i extend this to work for new custom kernels? I really think we want to make probe an array to allow reduce/execute rules? |
3e6c3cb to
12f4b8f
Compare
12f4b8f to
4b5ce4a
Compare
4b5ce4a to
74eda6a
Compare
ab3ce3b to
fd2586b
Compare
cfed2d7 to
b888b1b
Compare
5bea57b to
6207abb
Compare
6207abb to
159aaff
Compare
Replace comparison/OR chains with prepared membership probes, normalize constant sets, and evaluate list and needle columns together. Include canonicalization support and probe regressions. Build on the separate SQL null-semantics and benchmark changes. Signed-off-by: Robert Kruszewski <github@robertk.io>
Import the execution-context trait, remove trailing macro commas, and construct the struct fixture outside the generated fallible test wrapper. Signed-off-by: Robert Kruszewski <github@robertk.io>
Signed-off-by: Robert Kruszewski <github@robertk.io>
Signed-off-by: Robert Kruszewski <github@robertk.io>
159aaff to
77f114d
Compare
| parent: ArrayView<'_, ScalarFn>, | ||
| child_idx: usize, | ||
| ) -> VortexResult<Option<ArrayRef>> { | ||
| if parent.scalar_fn().is::<ListContains>() { |
There was a problem hiding this comment.
this is a hack, we essentially have common setup we would like to share across chunks, if we just dispatch over each chunk there's no place to store the shared state
Replace constant-set membership comparison/OR chains with prepared, single-pass probes