perf(fastlanes): Evaluate constant list membership - #9682
Conversation
Signed-off-by: Will Manning <will@willmanning.io>
Merging this PR will degrade performance by 5.63%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | WallTime | arrow_checked_add_u32_neon[16384] |
13.5 µs | 20.3 µs | -33.75% |
| ❌ | WallTime | mul_u64_nonnull_neon |
15.1 µs | 20 µs | -24.62% |
| ❌ | WallTime | mul_i64_nonnull_neon |
17.1 µs | 20 µs | -14.76% |
| ❌ | WallTime | multiply_shapes_neon[(16384, PerRowPerRow)] |
17.3 µs | 20.2 µs | -14.32% |
| ❌ | Simulation | filter_powerlaw_by_mostly_true[250000] |
186.5 µs | 215.9 µs | -13.6% |
| ❌ | Simulation | filter_random_by_mostly_true[250000] |
186.6 µs | 215.9 µs | -13.57% |
| ❌ | Simulation | compress_fsst[(500, 64, 8)] |
475.1 µs | 541.5 µs | -12.26% |
| ❌ | Simulation | filter_powerlaw_by_random[250000] |
170.9 µs | 194 µs | -11.91% |
| ❌ | Simulation | filter_random_by_random[250000] |
170.8 µs | 193.9 µs | -11.89% |
| ❌ | Simulation | density_sweep_random[0.9] |
92.5 µs | 104 µs | -11.11% |
| ❌ | Simulation | filter_powerlaw_by_mostly_true[100000] |
93.6 µs | 105.2 µs | -10.99% |
| ❌ | Simulation | filter_random_by_mostly_true[100000] |
93.2 µs | 104.7 µs | -10.97% |
| ❌ | Simulation | density_sweep_random[0.95] |
93.1 µs | 104.5 µs | -10.92% |
| ❌ | Simulation | density_sweep_dense_runs[0.9] |
92.5 µs | 103.8 µs | -10.88% |
| ❌ | Simulation | density_sweep_dense_runs[0.95] |
93.3 µs | 104.5 µs | -10.77% |
| ❌ | Simulation | filter_powerlaw_by_power_law[250000] |
161.4 µs | 179.7 µs | -10.19% |
| ❌ | Simulation | filter_random_by_power_law[250000] |
161.2 µs | 179.4 µs | -10.18% |
| ⚡ | Simulation | compact_sliced[(2048, 10)] |
251.4 µs | 180.9 µs | +38.96% |
| ⚡ | Simulation | compact_sliced[(1024, 10)] |
149.7 µs | 114.3 µs | +30.9% |
| ⚡ | WallTime | arrow_checked_add_u32_avx512[16384] |
21.3 µs | 17.7 µs | +20.4% |
| ... | ... | ... | ... | ... | ... |
ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing wm/fastlanes-list-contains (4c49d32) with develop (01f147a)
Footnotes
-
106 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. ↩
-
4 benchmarks were run, but are now archived. If they were deleted in another branch, consider rebasing to remove them from the report. Instead if they were added back, click here to restore them. ↩
Signed-off-by: Will Manning <will@willmanning.io>
Evaluate constant integer list membership directly against BitPacked arrays. Lists with one to four members use fused comparisons. Larger lists with spans up to 4 KiB use a byte lookup table during FastLanes unpack. Wider spans decode once and reuse the prepared sorted membership plan. A Primitive kernel provides the optimized canonical fallback. Empty lists return false for null needles. Non-empty lists preserve needle validity, and null lists return null.
Local benchmarks cover 64, 1,024, and 65,536 values across 1, 4, 8, 32, and 64 list members. Compressed execution was 21–54% faster than canonical fallback. Tables near the 4 KiB cap were 20–35% faster. Wide sparse sets were 10–16% faster at 1,024 rows and stayed within 1% at 65,536 rows.
🤖 Generated with Codex