Skip to content

Skip dense meet joined-mask scans#47

Open
MesTTo wants to merge 1 commit into
Adam-Vandervorst:masterfrom
MesTTo:pr/pathmap-dense-meet-overlap
Open

Skip dense meet joined-mask scans#47
MesTTo wants to merge 1 commit into
Adam-Vandervorst:masterfrom
MesTTo:pr/pathmap-dense-meet-overlap

Conversation

@MesTTo

@MesTTo MesTTo commented Jun 23, 2026

Copy link
Copy Markdown

Summary

Implements the TODO in the dense meet: instead of walking both dense nodes'
full masks and re-testing membership per byte, walk the intersection mask
directly, so bytes absent from either side are never visited. No public API
change; is_identity handling is equivalent (the intersection walk observes
the same element/identity outcomes the full walk did).

Result

Measured on this branch vs master (interleaved, two reps each side, best
median): superdense_meet 8000 26.1→25.0us, 16000 42.5→39.8us, 32000
100→93.9us (a consistent 4-6% where the masks are dense); sparse_meet and
binary_meet at parity to -2% (their masks are thin, so there's little scan
to skip). Composes cleanly with pr/pathmap-hardening's DenseByteNode
operand-selection fix (both touch this file; they auto-merge, and the
algebra differential passes with both applied).

Test plan

  • cargo test --release --lib (660/0, matches the master baseline)
  • cargo test --release --test pathmap_algebra_differential (4/4)
  • cargo bench --bench superdense_keys / sparse_keys / binary_keys -- meet

@MesTTo MesTTo marked this pull request as ready for review June 23, 2026 10:23
Implements the TODO in the dense meet: instead of walking both dense nodes'
full masks and re-testing membership per byte, walk the intersection mask
directly, so bytes absent from either side are never visited. No public API
change; is_identity handling is equivalent (the intersection walk observes the
same element/identity outcomes the full walk did).

Motivated by the existing meet benchmarks, measured on this tree vs its base
(interleaved, two reps each side, best median): superdense_meet 8000
26.1->25.0us, 16000 42.5->39.8us, 32000 100->93.9us (a consistent 4-6% where
the masks are dense); sparse_meet and binary_meet at parity to -2% (their masks
are thin, so there is little scan to skip). Result-identical: the full suite
and the seeded algebra differential pass, including composed with the
DenseByteNode operand-selection fix (both touch this file; they auto-merge and
the differential passes with both applied).
@MesTTo MesTTo force-pushed the pr/pathmap-dense-meet-overlap branch from 3e26e0b to 5178984 Compare July 4, 2026 18:23
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.

1 participant