Repository navigation
duplicate ZstdBuffer's validity into a slot instead of using the legacy session - #10586
Conversation
`ValidityVTable::validity` has no context, but a ZstdBuffers array has to rebuild its inner array to answer it. Keep the session the array was compressed or deserialized with instead of using the hidden global `legacy_session()`. Signed-off-by: Claude <noreply@anthropic.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y1zHpE1K1Y9HvyU4kt24Tq
Merging this PR will degrade performance by 21.8%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ❌ | WallTime | threshold_neon[8] |
1.4 µs | 2.8 µs | -51.71% |
| ❌ | WallTime | threshold_neon[64] |
2.5 µs | 3.7 µs | -33.14% |
| ❌ | WallTime | filter_neon[8] |
886 ns | 1,194 ns | -25.8% |
| ❌ | WallTime | threshold_neon[80] |
3.4 µs | 4.4 µs | -22.07% |
| ❌ | WallTime | filter_neon[80] |
2.5 µs | 3.2 µs | -21.23% |
| ❌ | WallTime | filter_neon[64] |
1.8 µs | 2.1 µs | -15.63% |
| ❌ | WallTime | bitpack_blocked_compress_avx2 |
6.7 µs | 7.6 µs | -12.17% |
| ❌ | WallTime | decode_chunked_neon[i64, 524288] |
13.3 µs | 14.8 µs | -10.66% |
| ⚡ | WallTime | starts_with_avx2[8, VarBin] |
46.6 µs | 41.5 µs | +12.38% |
Tip
Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.
Comparing rk/legacy-session-zstd-buffers (e70be20) with develop (5fc5cb8)
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. ↩
ZstdBuffers stores the wrapped array's validity as a slot when compressing, reusing the wrapped array's own validity child when it has one. Validity is then read without decompressing or rebuilding the wrapped array, so the array no longer needs a session. Arrays serialized before this change compute their validity once at deserialize time. Signed-off-by: Claude <noreply@anthropic.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y1zHpE1K1Y9HvyU4kt24Tq
ValidityVTable::validityhas no context, andZstdBuffersused to rebuild its wrapped array (which needs a session) to answer it. Now the validity is lifted out of the wrapped array when compressing, so it can be read straight from a slot without decompressing anything and without storing a session.part of #9446