Repository navigation
Ignore empty constant chunks in aggregate states - #10254
Conversation
Merging this PR will regress 9 benchmarks
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | Simulation | filter_powerlaw_by_random[250000] |
131.8 µs | 169.4 µs | -22.2% |
| ❌ | Simulation | take_filter_primitive_nullable_slice_mask_random_indices[4096, 1000] |
96.8 µs | 122.9 µs | -21.22% |
| ❌ | Simulation | take_filter_primitive_nullable_slice_mask_random_indices[16384, 1000] |
115.4 µs | 145 µs | -20.43% |
| ❌ | Simulation | take_filter_list_slice_mask_sequential_indices[768, 50] |
128.5 µs | 150.5 µs | -14.64% |
| ❌ | Simulation | take_filter_list_slice_mask_sequential_indices[256, 50] |
129.9 µs | 150.8 µs | -13.83% |
| ❌ | Simulation | filter_powerlaw_by_random[10000] |
30.2 µs | 34.1 µs | -11.54% |
| ❌ | Simulation | filter_powerlaw_by_mostly_false[10000] |
29.3 µs | 33.1 µs | -11.35% |
| ❌ | Simulation | filter_random_by_mostly_false[10000] |
29.4 µs | 33 µs | -11.04% |
| ❌ | Simulation | filter_random_by_random[10000] |
30.3 µs | 34 µs | -10.91% |
| ⚡ | Simulation | density_sweep_single_slice[0.9999] |
85 µs | 24.1 µs | ×3.5 |
| ⚡ | Simulation | density_sweep_single_slice[0.999] |
84.7 µs | 24.1 µs | ×3.5 |
| ⚡ | Simulation | density_sweep_single_slice[0.95] |
82.8 µs | 24.1 µs | ×3.4 |
| ⚡ | Simulation | density_sweep_single_slice[0.99] |
82.6 µs | 24.1 µs | ×3.4 |
| ⚡ | Simulation | density_sweep_single_slice[0.5] |
64.6 µs | 24.2 µs | ×2.7 |
| ⚡ | Simulation | density_sweep_single_slice[0.9] |
49.4 µs | 24.2 µs | ×2 |
| ⚡ | Simulation | density_sweep_single_slice[0.1] |
48.5 µs | 24.2 µs | ×2 |
| ⚡ | Simulation | density_sweep_single_slice[0.05] |
46.7 µs | 24.2 µs | +93.04% |
| ⚡ | Simulation | density_sweep_single_slice[0.01] |
41.5 µs | 24.2 µs | +71.63% |
| ⚡ | Simulation | density_sweep_random[0.02] |
89.3 µs | 64.6 µs | +38.22% |
| ⚡ | Simulation | patterns_i128[Contiguous] |
30 µs | 21.9 µs | +37.02% |
| ... | ... | ... | ... | ... | ... |
ℹ️ 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 ct/stats-empty-constant-aggregates (e5061a4) with develop (8ff4b4a)2
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. ↩
-
No successful run was found on
develop(23a59e3) during the generation of this report, so 8ff4b4a was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
bfdbb5a to
e5061a4
Compare
Tracking Issue: #10177
Summary
A zero-length constant array still carries a scalar, but that scalar contributes no values to an aggregate. The Constant arms for MinMax, constantness, and sortedness currently observe it anyway, creating extrema or stream boundaries that can change results for later chunks.
Changes
Skip those Constant arms when the input is empty, preserving the empty partial as the merge identity. An empty input has null extrema, is not constant, and is sorted. Empty chunks also leave the first and last values of a nonempty stream unchanged.
This fixes existing accumulator behavior and can be reviewed independently of the statistics migration stack.