Skip to content

Move fsst kernel logic out of dispatch macros - #11527

Merged
joseph-isaacs merged 2 commits into
developfrom
ji/mutants-macros-fsst
Nov 17, 2026
Merged

joseph-isaacs merged 2 commits into
developfrom
ji/mutants-macros-fsst

Conversation

@joseph-isaacs

@joseph-isaacs joseph-isaacs commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

cargo-mutants can't mutate code inside macros, so logic in fsst's match_each_*! bodies was never mutation tested. This moves the offset-span and out-of-line length sums into generic offsets_byte_span and sum_out_of_line_lengths.

🤖 Generated with Claude Code

https://claude.ai/code/session_01UeniBAvrcuvbZMgsM2XrTM

cargo-mutants does not mutate code inside macro invocations, so logic
written in a match_each_*! body is never mutation tested. Keep those
calls as thin dispatch and move the logic into generic helpers:

- compress.rs: the first-to-last offset span used to choose the FSST
  output offset width moves into offsets_byte_span.
- compute/uncompressed_size_in_bytes.rs: the sum of valid out-of-line
  lengths moves into sum_out_of_line_lengths.

Behavior and monomorphization are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UeniBAvrcuvbZMgsM2XrTM
Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>
@codspeed

codspeed Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Merging this PR will degrade performance by 11.17%

1 warning

⚠️ 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

❌ 2 regressed benchmarks
✅ 1960 untouched benchmarks
⏩ 53 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
❌ Walltime decode_chunked_neon[i64, 524288] 13.9 µs 15.7 µs -11.31%
❌ Walltime decode_blocked_bitpacked_chunked_neon[u32, 524288] 26.9 µs 30.2 µs -11.02%

Tip

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


Comparing ji/mutants-macros-fsst (f6dbeec) with develop (7737dbb)

Open in CodSpeed

Footnotes

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

@joseph-isaacs
joseph-isaacs enabled auto-merge (squash) November 17, 2026 13:27
@joseph-isaacs joseph-isaacs added the changelog/chore A trivial change label Nov 17, 2026 — with Claude

Copy link
Copy Markdown
Contributor Author

CI status: the failing "Integration smoke tests" job fails on develop too, so it doesn't come from this PR. wasm-test/ has no lockfile and picked up fastlanes 0.8.1, which now requires a 'static bound in rle_decompress.rs (E0310). Fixed in #11543. I'll merge develop into this branch once that lands.


Generated by Claude Code

Signed-off-by: Joe Isaacs <joe.isaacs@live.co.uk>

Copy link
Copy Markdown
Contributor Author

The CodSpeed regression doesn't come from this PR. The two flagged benchmarks are fastlanes for_decode neon walltime benches (decode_chunked_neon[i64] and decode_blocked_bitpacked_chunked_neon[u32]). This PR only changes encodings/fsst/src/compress.rs and encodings/fsst/src/compute/uncompressed_size_in_bytes.rs, and those files aren't part of what those benchmarks build. CodSpeed itself warns that these walltime results ran outside its Macro Runners and may be unreliable. This one needs acknowledging on CodSpeed rather than a code change.


Generated by Claude Code

@joseph-isaacs
joseph-isaacs merged commit d21879d into develop Nov 17, 2026
79 of 80 checks passed
@joseph-isaacs
joseph-isaacs deleted the ji/mutants-macros-fsst branch November 17, 2026 14:15
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.

2 participants