Repository navigation
lab(dr256): slab planes read as 256 borrowed selections (D-DRDT-SPLIT-1 S2) - #2019
Merged
Merged
Conversation
Plane::masks / mask / selections expose each 256-row band of a slab plane as a borrowed Selection (coordinate space, row, four words) in the same chunk layout as WideFieldMask::words, without copying or allocating. The plane stays one contiguous word slice for mask-RISC. selection_forms example measures the contiguous, borrowed and owned-WideFieldMask forms. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XAqKMPJjVvasjwqhjJ6c9p
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
AdaWorldAPI
marked this pull request as ready for review
November 11, 2026 19:57
Codex Review Summary: ✅ CompletedThis 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
S2 of
dr-widefieldmask-dt-classview-v1.md§5: each 256-row band of a slab plane is readable as a borrowedSelectionin the same chunk layout asWideFieldMask::words, without copying or allocating. The plane stays one contiguous word slice for mask-RISC.What changed
crates/dr256-ternlog-lab/src/lib.rs:MASK_BITS,MASK_WORDS,SLAB_MASKS;Plane::{masks, mask, selections};Selection<'p> { space, row, words }withhas,count,is_empty,same_bits(&WideFieldMask).tests/lab.rs: four tests (T1–T4).examples/selection_forms.rs: six arms, each checked against a row-at-a-time oracle before timing.Existing behaviour changed: none (additive).
Evidence
cargo test -p dr256-ternlog-lab: 19 passed. clippy-D warningsand fmt clean.row * MASK_WORDS + 1;n % 32lo > len;row as u8.mininstead of.maxinsame_bitsspacecargo run --release --example selection_forms), median of 31:Reading of the numbers
Reading the planes row by row is 9–14× slower than one pass over the contiguous words. Owned per-row masks are faster to scan than the borrowed view, but building them costs 120× a contiguous pass. So the per-row
Selectionis an addressing view (which rows a reader names, compare against aWideFieldMask). Folds keep reading the contiguous plane. Why the borrowed per-row loop is slower than the owned one (threemask()calls with bounds checks per row is the likely cost) is not measured.Not verified
Only this crate was built and tested. Nothing outside the lab reads
Selectionyet.Generated by Claude Code