Skip to content

Compress fixed-size lists without their null rows - #10425

Open
robert3005 wants to merge 1 commit into
developfrom
rk/compress-fsl-validity
Open

robert3005 wants to merge 1 commit into
developfrom
rk/compress-fsl-validity

Conversation

@robert3005

@robert3005 robert3005 commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Add SparseScheme for FixedSizedList. Instead of compressing just the elements we attempt compressing whole lists using SparseArray

Readers need no changes, because Sparse already canonicalizes fixed-size lists.

On the data from #10417:

Before After
Mostly-null file (1 row in 20 valid) 25,296 B 9,056 B
Rewrite of both files 292,808 B 190,768 B

@codspeed

codspeed Bot commented Oct 10, 2026 •

Copy link
Copy Markdown

Merging this PR will regress 2 benchmarks

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

⚠️ 17 benchmarks spent significant time in system calls

System calls cannot be consistently instrumented, so they are not included in the measure, which understates the real cost. Please switch to the Walltime instrument to accurately measure system calls.

Measurement and system calls

ℹ️ 40 benchmarks have no flame graph

The flamegraph could not be generated because we failed to resolve the symbols in the profiling trace. This happens when we fail to harvest information about language frames.

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

⚡ 2 improved benchmarks
❌ 2 regressed benchmarks
✅ 2404 untouched benchmarks
⏩ 12 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
❌ WallTime bitpack_blocked_compress_avx2 6.7 µs 7.6 µs -11.5%
❌ Simulation take[routing/grouped_chunks/primitive/nonnull/chunks=32/indices=1000] 385 µs 428.4 µs -10.14%
⚡ ℹ️ Simulation test_repeated_scan_scalar_at[int_str] 481.3 µs 406.6 µs +18.38%
⚡ WallTime starts_with_avx2[64, VarBin] 60.4 µs 54.2 µs +11.48%

Tip

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


Comparing rk/compress-fsl-validity (24e77ed) with develop (61ff28d)

Open in CodSpeed

Footnotes

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

@robert3005
robert3005 force-pushed the rk/compress-explicit-fallback branch from c3ad942 to 8d11832 Compare October 19, 2026 18:08
Base automatically changed from rk/compress-explicit-fallback to develop October 19, 2026 18:16
A fixed-size list stores `list_size` elements for every row, null or not, and
the compressor only ever compressed those elements, so it had to encode
whatever sits under the null rows. A UUID column that is mostly null was
compressed as dense bytes unless the elements happened to be 90% zeros, and
once mixed with a dense chunk not at all.

The compressor now offers fixed-size lists to schemes before compressing their
elements, after canonicalizing the elements so a scheme's output is compared
against the list's real size. The new `FixedSizeListSparseScheme` estimates the
saving of storing only the valid rows plus their bit-packed positions, and
when it is at least 10% encodes the list as `Sparse` with a null fill, its
values being the valid rows compressed recursively.

On the data from #10417, the mostly-null file shrinks from 25,296 to 9,056
bytes and the rewrite of both files from 292,808 to 190,768 bytes.

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

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015XzXtnsrnEsBNVa9R2VqKQ
@robert3005
robert3005 force-pushed the rk/compress-fsl-validity branch from c05ea8e to 24e77ed Compare October 19, 2026 20:28

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.

2 participants