Repository navigation
perf(array): snapshot aggregate kernels in ExecutionCtx - #10561
Conversation
Merging this PR will degrade performance by 13.1%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ |
Simulation | random_i128[0.01] |
4.8 µs | 6 µs | -19.42% |
| ❌ | Simulation | random_i8[0.01] |
101.3 µs | 117 µs | -13.46% |
| ❌ | WallTime | starts_with_avx2[64, VarBin] |
53.3 µs | 60.4 µs | -11.75% |
| ❌ | WallTime | bitpack_blocked_compress_avx2 |
6.7 µs | 7.6 µs | -11.5% |
| ❌ ℹ️ | Simulation | test_scan_filter[int] |
3.1 ms | 3.5 ms | -11.15% |
| ❌ | Simulation | isolated_runs[u32, (16, 0)] |
78.5 µs | 88.2 µs | -10.97% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing ji/vibrant-ritchie-0ct678 (2a2cde3) with develop (5d8fa18)
Footnotes
-
12 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. ↩
Aggregate accumulators looked up `AggregateFnSession` on every batch and on every iteration of their execute loop, paying a session arc-swap load, two type-map lookups and a registry load each time. Snapshot the aggregate, grouped and grouped-encoding kernel registries into the `ExecutionCtx` on first use, mirroring the execute-parent kernel snapshot, and dispatch through it. Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GjnvCm6kT6P79iEBaHshSN
d89f064 to
2a2cde3
Compare
Summary
Aggregate accumulators look up
AggregateFnSessionon every batch and on every pass of their execute loop. The grouped accumulator does two lookups per pass. Each lookup loads the session map, does twoTypeIdlookups and then loads the registry. This PR snapshots the aggregate kernel registries into theExecutionCtxon first use, the same way execute-parent kernels are already snapshotted, so those lookups only read a plainHashMap.This follows the idea in #10541, which avoids an unused session lookup.