Skip to content

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

Draft
lwwmanning wants to merge 1 commit into
developfrom
wm/fsst-uncompressed-size
Draft

lwwmanning wants to merge 1 commit 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

Signed-off-by: Will Manning <will@willmanning.io>
@codspeed

codspeed Bot commented Sep 3, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by 14.57%

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 3 improved benchmarks
✅ 2178 untouched benchmarks
⏩ 206 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
⚡ Simulation decompress[u64, (4000, 1024)] 85.7 µs 70.4 µs +21.81%
⚡ Simulation allocate_drop_bytes[0] 520.2 ns 466 ns +11.62%
⚡ WallTime mul_u32_nonnull_avx512 6.3 µs 5.7 µs +10.61%

Tip

Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.


Comparing wm/fsst-uncompressed-size (655c3dd) with develop (dab1684)

Open in CodSpeed

Footnotes

  1. 206 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
Comment on lines +68 to +83
fn checked_sum_lengths<P>(lengths: &[P]) -> VortexResult<u64>
where
P: Copy,
u64: TryFrom<P>,
<u64 as TryFrom<P>>::Error: std::fmt::Display,
{
lengths.iter().try_fold(0u64, |total, length| {
let length = u64::try_from(*length).map_err(|error| {
vortex_err!("Failed to convert FSST uncompressed length to u64: {error}")
})?;
total
.checked_add(length)
.ok_or_else(|| vortex_err!("FSST decoded size overflowed u64"))
})
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this need to be checked?

@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

This branch has not been deployed

No deployments
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.

3 participants