Skip to content

FSST: decompress straight into the builder's byte storage - #9097

Open
robert3005 wants to merge 1 commit into
developfrom
rk/fsst-decode-into-builder
Open

FSST: decompress straight into the builder's byte storage#9097
robert3005 wants to merge 1 commit into
developfrom
rk/fsst-decode-into-builder

Conversation

@robert3005

@robert3005 robert3005 commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

FSST append_to_builder decodes directly into the builder storage without additional copy

@robert3005 robert3005 added the changelog/chore A trivial change label Jul 31, 2026
@robert3005
robert3005 marked this pull request as ready for review July 31, 2026 13:40
@robert3005
robert3005 force-pushed the rk/fsst-decode-into-builder branch from 2de8a74 to 96d2f3d Compare July 31, 2026 18:11
@codspeed-hq

codspeed-hq Bot commented Jul 31, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 1842 untouched benchmarks
⏩ 44 skipped benchmarks1


Comparing rk/fsst-decode-into-builder (4d3cb97) with develop (02f89d6)

Open in CodSpeed

Footnotes

  1. 44 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.

Base automatically changed from rk/varbin-builder-trait to develop August 4, 2026 11:12
`append_to_builder` staged the decompressed heap in a temporary
`ByteBufferMut` and then copied it into the builder. `FsstDecodePlan` hoists
the parts of `fsst_decode_bytes` that describe the decode — the code stream,
the per-row lengths and the total decoded size — so the decompression can
target the builder's spare capacity directly via `append_decoded`, leaving one
prefix sum over the lengths as the only work beyond the bulk
`decompress_into`.

`FSST_DECODE_SLACK` names the 7 spare bytes that keep `decompress_into` on its
wide-store path through the final value; it is a performance knob, not a safety
requirement.

Signed-off-by: Robert Kruszewski <robert@spiraldb.com>
Signed-off-by: Robert Kruszewski <github@robertk.io>
@robert3005
robert3005 force-pushed the rk/fsst-decode-into-builder branch from 96d2f3d to 4d3cb97 Compare August 4, 2026 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/chore A trivial change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant