Repository navigation
D-SRAM-2 spike: semijoin reduction before preparation - #1632
Conversation
When a star has a side restricted by a constant, every side is laid out only for the centers all restricted sides have (sorted Vec, binary search). Centers outside that set cannot reach the joint mask, so answers and bag multiplicities are unchanged. Options::semijoin, on in ALL. Tests N: same answers set/bag/count/exists with exact prepared-row counts, no change without a restricted side, empty restricted side, intersection of two restricted sides. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VncKoyG6JkpsoqhqTGTv3f
…ated Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VncKoyG6JkpsoqhqTGTv3f
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Warning Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
examples/row_filter.rs compares the scalar binary-search filter with ndarray's strided compare over the row bytes and its contiguous compare over a u32 column (all three agree; word-boundary sizes checked). Over the row-major store the strided pass is slower at every needle count, so prepare keeps the scalar test; over a contiguous column it is 5.8 us per needle at 50,000 rows and wins up to 64 needles. ndarray is a dev-dependency at the coordinate mask-risc uses. Plan §2c and board. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VncKoyG6JkpsoqhqTGTv3f
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Add Carrot credits or activate Agent usage billing to use Autofix |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2611fd9498
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| time(scalar).as_secs_f64() * 1e6, | ||
| time(simd).as_secs_f64() * 1e6, | ||
| time(|| column_in_mask(&rows, 0, &needles)).as_secs_f64() * 1e6, | ||
| time(|| rows_under(&rows, &mask)).as_secs_f64() * 1e6, | ||
| time(contiguous).as_secs_f64() * 1e6, |
There was a problem hiding this comment.
Compare equivalent outputs in the SIMD benchmark
For every contiguous_us value, this closure returns only a bit mask, while scalar_us times scalar(), which filters and collects full [u32; 2] rows; the analogous mask-to-row work is reported separately as collect_us but is never included in the contiguous result. Consequently the §2c break-even claim and column-major recommendation compare different stages, particularly when many rows match. Time a scalar mask producer or materialize rows from the contiguous mask before comparing them.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Correct: the contiguous arm returned the mask, while the strided arms returned rows. #1633 (a31c61bb) changes that arm to return rows_under(&rows, &m) and asserts that the result equals scalar(), so all arms are timed on the same output. The §2c numbers will be re-measured with that change.
Generated by Claude Code
Follow-up to #1631. This PR carries the semijoin commits, which were pushed after #1631 had already been merged. It is still the D-SRAM-2 lab research spike, not authorization.
What changes
crepe-plan-probe: when a star side is restricted by a constant, every side keeps only the rows whose center value appears in all restricted sides. The lookup is a sortedVec<u32>with binary search; no HashMap/HashSet. A center outside that set cannot reach the joint mask, so answers and bag multiplicities do not change.Options::semijoin, on inOptions::ALL.native::prepare_semijoin.prepareis unchanged.examples/measure.rs: ano-semijoinconfiguration measures the reduction separately.Evidence
Release build, n = 50,000 Parent rows:
Tests N (4), with exact counts of prepared rows:
Disable runs, each red:
All 20 tests are green; clippy
-D warningsand fmt are clean.Open
OutsideDomain).Generated by Claude Code