Skip to content

feat(fsst): Compute uncompressed size without decoding - #9755

Merged
robert3005 merged 2 commits into
developfrom
wm/fsst-uncompressed-size
Oct 27, 2026
Merged

robert3005 merged 2 commits into
developfrom
wm/fsst-uncompressed-size

Conversation

@lwwmanning

Copy link
Copy Markdown
Contributor

Summary

FSST already stores each value’s uncompressed length. This adds an FSST-specific UncompressedSizeInBytes aggregate that calculates the canonical size without decoding string payloads.

Changes

The kernel reads only the lengths child and accounts for canonical views and validity. It rejects negative lengths and arithmetic overflow. Tests compare results with materialized UTF-8 and binary arrays. They cover nullable, all-null, and sliced inputs.

🤖 Generated with Codex

@codspeed

codspeed Bot commented Sep 3, 2026 •

Copy link
Copy Markdown

Merging this PR will degrade performance by 8.63%

3 warnings, 1 note

⚠️ Walltime results may be unreliable

Some benchmarks used the Walltime instrument outside CodSpeed Macro Runners, which can make the results inconsistent.

Learn more about Macro Runners

See affected benchmarks

⚠️ Unable to measure the execution of 2 benchmarks

These benchmarks measured no execution time, so their results are not comparable and count as unchanged. This usually happens when the compiler removes the code under test.

Prevent compiler optimizations

See affected benchmarks

⚠️ 18 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

ℹ️ 40 benchmarks have no flamegraph

The flamegraph wasn't generated: the symbols of the profiling trace could not be resolved, because no information about the language frames was collected.

See affected benchmarks

⚡ 7 improved benchmarks
❌ 6 regressed benchmarks
✅ 2426 untouched benchmarks
⏩ 116 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
❌ Walltime filter_neon[8] 907 ns 1,843 ns -50.79%
❌ Walltime threshold_neon[8] 1.4 µs 2.5 µs -43.2%
❌ Walltime filter_neon[64] 1.8 µs 2.8 µs -35.83%
❌ Walltime threshold_neon[64] 2.6 µs 3.8 µs -31.34%
❌ Walltime threshold_neon[80] 3.5 µs 4.4 µs -20.42%
❌ Walltime filter_neon[80] 2.6 µs 3.2 µs -19.48%
⚡ Walltime mul_u16_nonnull_avx512 14.9 µs 10.8 µs +38.49%
⚡ Walltime mul_u32_nonnull_avx512 15.2 µs 11.5 µs +31.65%
⚡ Walltime subtract_shapes_avx512[(32768, PerRowPerRow)] 14.8 µs 11.6 µs +27.21%
⚡ Walltime mul_i8_nonnull_avx512 20.5 µs 17.2 µs +19.61%
⚡ Walltime mul_i16_nonnull_avx512 15.6 µs 13.6 µs +14.86%
⚡ Walltime mul_i32_nonnull_avx512 15.5 µs 13.9 µs +11.78%
⚡ Walltime mul_i32_nullable_avx512 16 µs 14.5 µs +10.04%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing wm/fsst-uncompressed-size (1498560) with develop (18c2340)

Open in CodSpeed

Footnotes

  1. 116 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. ↩

@lwwmanning lwwmanning added the changelog/feature A new feature label Sep 3, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This PR has been marked as stale because it has been open for 14 days with no activity. Please comment or remove the stale label if you wish to keep it active, otherwise it will be closed in 7 days

@github-actions github-actions Bot added the stale This PR is stale and will be auto-closed soon label Sep 21, 2026
@robert3005 robert3005 removed the stale This PR is stale and will be auto-closed soon label Sep 25, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This PR has been marked as stale because it has been open for 14 days with no activity. Please comment or remove the stale label if you wish to keep it active, otherwise it will be closed in 7 days

@github-actions github-actions Bot added the stale This PR is stale and will be auto-closed soon label Oct 11, 2026
@robert3005 robert3005 removed the stale This PR is stale and will be auto-closed soon label Oct 11, 2026
lwwmanning and others added 2 commits October 27, 2026 11:37
Signed-off-by: Will Manning <will@willmanning.io>
Rebased onto develop, where UncompressedSizeInBytes gained an exact
precision. The FSST kernel now reads the options: inexact sums all stored
lengths, exact sums only valid rows too long to inline, both without
decoding.

The checked length sum is shared with FsstDecodePlan, since only the
dtype of the stored lengths is validated on construction.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018SWbEsB3Q1XMtF1BJVYPot
Signed-off-by: Claude <noreply@anthropic.com>
@robert3005
robert3005 force-pushed the wm/fsst-uncompressed-size branch from 655c3dd to 1498560 Compare October 27, 2026 12:16
@robert3005
robert3005 marked this pull request as ready for review October 27, 2026 12:28
@robert3005
robert3005 merged commit fb4a037 into develop Oct 27, 2026
89 of 90 checks passed
@robert3005
robert3005 deleted the wm/fsst-uncompressed-size branch October 27, 2026 12:29
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.

4 participants