Skip to content

Add measured decompression throughput to the array tree display - #9565

Open
joseph-isaacs wants to merge 3 commits into
developfrom
claude/decompression-throughput-tree-gth0u2
Open

Add measured decompression throughput to the array tree display#9565
joseph-isaacs wants to merge 3 commits into
developfrom
claude/decompression-throughput-tree-gth0u2

Conversation

@joseph-isaacs

@joseph-isaacs joseph-isaacs commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Add a array tree display mode to see decompression throughput

Example, from the decompress benchmark's own trees:

== dict_fsst_varbin_string ==
root: vortex.dict(utf8, len=2048) nbytes=8.77 kB (100.00%)
  throughput: 63.27µs (100.00%) | in 138.52 MB/s | out 776.81 MB/s | 32.37 Mrow/s | self 61.91µs
  codes: vortex.primitive(u32, len=2048) nbytes=8.19 kB (93.46%)
    throughput: 67ns (0.11%) | in 122.27 GB/s | out 122.27 GB/s | 30.57 Grow/s | self 67ns
  values: vortex.fsst(utf8, len=20) nbytes=573 B (6.54%)
    throughput: 1.30µs (2.06%) | in 440.09 MB/s | out 368.66 MB/s | 15.36 Mrow/s | self 1.17µs

== for_bp_u64 ==
root: fastlanes.for(u32, len=2048) nbytes=2.05 kB (100.00%)
  throughput: 548ns (100.00%) | in 3.74 GB/s | out 14.95 GB/s | 3.74 Grow/s | fuses children (saves 170ns)
  encoded: fastlanes.bitpacked(u32, len=2048) nbytes=2.05 kB (100.00%)
    throughput: 718ns (131.02%) | in 2.85 GB/s | out 11.41 GB/s | 2.85 Grow/s | self 718ns

Root times track the decompress benchmark's medians within a few percent, so the breakdown can
be read against that benchmark directly:

tree divan median profile root
for_bp_u64 584.3 ns 548 ns
alp_for_bp_f64 4.676 µs 4.64 µs
dict_varbinview_string 2.327 µs 2.32 µs
runend_for_bp_u32 1.979 µs 1.91 µs
dict_fsst_varbin_string 64.88 µs 63.27 µs
dict_fsst_varbin_bp_string 43.91 µs 43.93 µs
datetime_for_bp 8.733 µs 8.69 µs

claude added 2 commits August 22, 2026 18:03
The tree display already answers "where do the bytes go". This adds a
composable extractor that answers "where does the decompression time go",
rendered through the same tree.

`DecompressionProfile::measure` canonicalizes every node of an encoding tree
in isolation and records the median wall time, keyed by node identity, so
`ThroughputExtractor` is a pure lookup on the tree `TreeDisplay` already walks.
No change to the renderer or to the `TreeDisplayExtractor` contract.

A node's self time is its subtree time minus its children's. Encodings that
rewrite a `(parent, child)` pair through an `execute_parent` kernel or a
`reduce_parent` rule reach canonical form without canonicalizing the child, so
they cost less than the sum of their children. That is reported as a fusion
saving rather than a negative self time, which needs no executor
instrumentation: it falls out of comparing a node against its children.

Gated behind the off-by-default `profile-throughput` feature, since the
measurement uses `Instant` and performs O(nodes * reps) decompressions.

Running the `decompress` benchmark's trees with `VORTEX_DECOMPRESS_PROFILE=1`
prints the per-subtree breakdown behind each of that benchmark's totals.

Signed-off-by: Claude <noreply@anthropic.com>

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016uJfeYsetVkEKGVFGuMS6a
- Cover the duration and rate formatting with unit tests, and the
  zero-reps edge with a profile test.
- Treat `reps: 0` as one timed run rather than reporting a zero time.
- Document that a share above 100% is the fusion signal, that unprofiled
  nodes are skipped, and how shared subtrees are counted.
- Run the crate's tests with `profile-throughput` on by default.

Signed-off-by: Claude <noreply@anthropic.com>

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016uJfeYsetVkEKGVFGuMS6a
@joseph-isaacs joseph-isaacs added the changelog/feature A new feature label Aug 24, 2026 — with Claude
`typos` rejects "canonicalizations"; say "runs" instead, which reads
better in both fields anyway.

Signed-off-by: Claude <noreply@anthropic.com>

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016uJfeYsetVkEKGVFGuMS6a
@joseph-isaacs
joseph-isaacs force-pushed the claude/decompression-throughput-tree-gth0u2 branch from faf55d3 to 023be0d Compare August 24, 2026 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/feature A new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants