Skip to content

perf(writer): sum a segment only for the legacy zone map that reads it - #712

Merged
dfa1 merged 1 commit into
mainfrom
skip-unused-segment-sums
Nov 8, 2026
Merged

dfa1 merged 1 commit into
mainfrom
skip-unused-segment-sums

Conversation

@dfa1

@dfa1 dfa1 commented Nov 8, 2026

Copy link
Copy Markdown
Owner

The writer summed every segment (and every global-dict chunk) for the zone-map SUM column, which only the legacy vortex.stats zone map writes; vortex.zoned (default) has no zone sum (#447). Spotted while profiling #706.

Now summed only when the legacy zone map is written. Files are unchanged; the legacy-edition interop tests still cover the sums.

JavaVsJniWriteBenchmark.javaWrite (OHLC 10M rows, depth 3, -f 2, interleaved A/B): 1.082/1.072 → 1.149/1.133 ops/s, ~6% faster.

🤖 Generated with Claude Code

SegmentEncoder summed every segment, and DictColumnState every dict
chunk, for the zone-map SUM column. Only the legacy vortex.stats zone
map writes that column: vortex.zoned (the default edition) records no
zone sum (#447), and with zone maps off nothing reads it. So the sum is
now taken only when the legacy zone map is written; files are
unchanged.

JavaVsJniWriteBenchmark.javaWrite (OHLC 10M rows, depth 3, -f 2,
interleaved): 1.082/1.072 -> 1.149/1.133 ops/s, about 6%, half of what
the file statistics (#664) added.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@dfa1
dfa1 force-pushed the skip-unused-segment-sums branch from 036b049 to dba8b72 Compare November 8, 2026 13:30
@dfa1
dfa1 merged commit 3a81b16 into main Nov 8, 2026
6 checks passed
@dfa1
dfa1 deleted the skip-unused-segment-sums branch November 8, 2026 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant