Repository navigation
perf: push a prepared list_contains set into Dict and RunEnd needles - #10442
robert3005 wants to merge 1 commit into
Conversation
Merging this PR will regress 3 benchmarks
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | WallTime | threshold_neon[8] |
3.5 µs | 4 µs | -13.37% |
| ❌ | Simulation | random_i8[0.01] |
108 µs | 122.9 µs | -12.08% |
| ❌ ℹ️ | Simulation | test_scan_filter[int] |
3.1 ms | 3.5 ms | -11.14% |
| ⚡ |
Simulation | random_i128[0.01] |
7.6 µs | 6 µs | +26.88% |
| ⚡ | WallTime | filter_avx512[64] |
2.5 µs | 2.2 µs | +15.67% |
| ⚡ | WallTime | filter_neon[64] |
3.4 µs | 3 µs | +14.04% |
| ⚡ | WallTime | filter_neon[80] |
3.6 µs | 3.1 µs | +13.32% |
| ⚡ | WallTime | bitpack_blocked_compress_avx512 |
5.5 µs | 4.8 µs | +12.71% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing rk/list-contains-dict-runend (26a71c9) with develop (c1a2ca1)
e86b215 to
4bb2b50
Compare
520e97b to
59aa869
Compare
59aa869 to
a6758cb
Compare
`list_contains` of a prepared constant set over dictionary or run-end encoded needles probed every row. Reduce rules for `Dict` and `RunEnd` now push the function into their values with a slice of the prepared set, so the set is probed once per distinct value or run and the shared set is not built again. Off SQL null semantics, an empty set answers `false` for a null code, so the dictionary rule returns a constant `false` in that case. Signed-off-by: Robert Kruszewski <robert@spiraldb.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Robert Kruszewski <github@robertk.io>
a6758cb to
26a71c9
Compare
Summary
Split out of #10052.
list_containsof a prepared constant set over dictionary or run-end encoded needles probed every row. With this change, it probes once for each distinct value or run.Changes
ListContainsElementReduceforDictandRunEndpushes the function into the values with a slice of thePreparedSetArray. This shares the one prepared set, so the set is not built again.falsefor a null code. Thus the dictionary rule returns a constantfalsein that case.🤖 Generated with Claude Code