Repository navigation
dr-isa-stream-lab: resolve the virtual object through LaneBinding::borrow_all - #1989
Merged
Merged
Conversation
…rrow_all VirtualObject::resolve now checks the binding once and borrows every bound lane through LaneBinding::borrow_all (#1988), then places the lanes in the view's row order. The old resolve called LaneBinding::addr, a linear scan, once per field, so it was O(N^2) in the field count. Measured on one AMX VM, three runs each, median of 41 warm calls: - 256 fields: 1.6-2.0 us, against 26-28 us on main and 13.8-13.9 us in #1987 as first measured; lane() per field (kept as a baseline) is 119-170 us. - 64 fields: 0.97-1.2 us, against 3.9-4.2 us on main. Every refusal propagates, a vanished lane included, and nothing reaches a GEMM arm from a partially resolved object. Field order, zero-copy borrows and the zero-allocation hot path are kept. Also adds the DR x DT64 Locality and Execution Contract knowledge doc (EXO-220), indexed from CLAUDE.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XAqKMMWgnUU9g7Ldyn6sbk
|
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 10, 2026 17:11
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.
Follow-up to #1987 and #1988.
VirtualObject::resolvenow checks the binding once and borrows every bound lane throughLaneBinding::borrow_all, then places each lane in the view's row order. Contract:.claude/knowledge/dr-dt64-locality-execution-contract.md(decision EXO-220), added in this PR.Not for automatic merge.
Why
The old
resolvecalledLaneBinding::addronce per field.addris a linear scan, so resolving N fields cost N² lookups. That mademainslower than #1987 as first measured: the provenance fix added the scan.Results (one AMX VM, three runs each, median of 41 warm calls)
mainbefore this PRborrow_all(this PR)lane()per field (baseline only)The ~14 µs check-once figure is preserved, and beaten by about 7×. Raw output:
crates/dr-isa-stream-lab/results/shape-2026-11-10-{main-before-borrow-all,borrow-all}-run{1,2,3}.txt. The run-to-run variation on this VM is up to about 35%.The benchmarks were taken on this code on top of the #1988 branch. After rebasing onto
main(which now contains #1988) the code is identical, and the 36 tests pass.What is kept
resolve_keeps_the_view_row_order.[Option<SlabLane>; 256].borrow_allpropagates,Vanishedincluded, so no GEMM arm runs on a partially resolved object. Test: vanished-lane refusal.resolve_per_fieldstays, as a benchmark baseline.Governing question
Before: the field-to-address lookup, repeated per field. After: one check, one walk over the binding's own address list.
Gates
cargo fmt --check: clean.cargo clippy --release --all-targets -D warnings: clean.cargo test --release: 36 passed..claude/board/entries/2026-11-10-lab-resolve-borrow-all.md.The INT8 / FACET STRIDE audit follows as a draft stacked on this branch.
Generated by Claude Code