Skip to content

perf(layout): prune multi-field boolean predicates in the struct reader - #10689

Open
MichaHoffmann wants to merge 1 commit into
vortex-data:developfrom
MichaHoffmann:compound-key-pruning
Open

MichaHoffmann wants to merge 1 commit into
vortex-data:developfrom
MichaHoffmann:compound-key-pruning

Conversation

@MichaHoffmann

@MichaHoffmann MichaHoffmann commented Oct 22, 2026 •

Copy link
Copy Markdown

Scan level conjunct splitting cannot seperate predicates such as a > 1
OR (a = 1 and b > 4), because the disjunction must remain intact.
The struct reader previously skipped pruning for these multi-field
predicates, forcing scans to decode zones that column statistics could
rule out.

Summary

  • Tracking Issue: #000

Changes

@joseph-isaacs

Copy link
Copy Markdown
Contributor

Thanks for the contribution.

Does the conjunct partitioner not handle this in the ScanBuilder/exec_splits methods.

Can we try and unify this logic with other parts of the StructLayoutReader

@codspeed

codspeed Bot commented Oct 22, 2026

Copy link
Copy Markdown

Merging this PR will regress 5 benchmarks

4 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 1 benchmark

This benchmark measured no execution time, so its result is not comparable and counts as unchanged. This usually happens when the compiler removes the code under test.

Prevent compiler optimizations

See affected benchmarks

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

⚠️ Base and head ran on different runner types

Some benchmarks with significant performance changes were compared across different runner types, so the changes might not come from the code. Run base and head on the same runner type, or use CodSpeed Macro Runners for more stable results.

Learn more about Macro Runners

Open the report in CodSpeed to investigate

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

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

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
❌ Walltime threshold_neon[80] 3.4 µs 4.4 µs -22.99%
❌ Walltime filter_neon[8] 883 ns 1,089 ns -18.92%
❌ Walltime filter_neon[64] 1.7 µs 2 µs -14.16%
❌ Walltime bitpack_blocked_compress_avx2 6.8 µs 7.6 µs -10.98%
❌ Walltime filter_neon[80] 2.5 µs 2.7 µs -10.26%
⚡ CPU Simulation bench_compare_sliced_dict_primitive[(2000, 10000)] 67.6 µs 13.2 µs ×5.1
⚡ Walltime starts_with_avx2[64, VarBin] 62.6 µs 56 µs +11.85%

Tip

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


Comparing MichaHoffmann:compound-key-pruning (096e752) with develop (86d2845)

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

Scan level conjunct splitting cannot seperate predicates such as a > 1
OR (a = 1 and b > 4), because the disjunction must remain intact.
The struct reader previously skipped pruning for these multi-field
predicates, forcing scans to decode zones that column statistics could
rule out.

Signed-off-by: Michael Hoffmann <mhoffmann@cloudflare.com>
@MichaHoffmann

Copy link
Copy Markdown
Author

Thanks for the contribution.

Does the conjunct partitioner not handle this in the ScanBuilder/exec_splits methods.

Can we try and unify this logic with other parts of the StructLayoutReader

No it doesnt because the condition contains a disjunction! But the AI helped me to unify the logic a little and simplfiy the PR drastically!

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants