Repository navigation
dt64: LaneBinding::borrow_all — one check for every bound lane - #1988
Merged
Merged
Conversation
LaneBinding::lane re-checks every bound lane on each call, so reading all N lanes cost N^2 source lookups (155 us at 256 fields in #1987's lab, against 14 us for one check). borrow_all checks once and returns BoundLanes, an ExactSizeIterator over the bound lanes in ascending field order. Refusals return before any borrow; a vanished lane is reported at its position. No allocation. 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 16:34
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. |
…t64-borrow-all # Conflicts: # .claude/board/entries/README.md
This was referenced Nov 10, 2026
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.
LaneBinding::lanere-runscheckon every call, andcheckwalks every bound lane. Reading all N bound lanes therefore costs N² source lookups. #1987's lab measured this at 256 fields: 155 µs to resolve throughlaneper field, against 14 µs for one check followed by N borrows.Change
LaneBinding::borrow_all(store, view, frames, source)callscheckonce. It then returnsBoundLanes, anExactSizeIteratorofResult<(field, S::Lane), LaneRefusal>in ascending field order.Err(Vanished { field })at that position and still hands out the other lanes.lanestays as it was;BoundLanesis re-exported from the crate root.Tests
Four new tests in
tests/lane_socket.rs:borrow_all_yields_every_bound_lane_in_place_in_field_orderlanereturnsborrow_all_checks_once_where_lane_per_field_checks_each_timelane_oflookups for 2 bound lanes, against 4 forlaneper fielda_refused_borrow_all_borrows_nothinga_vanished_lane_is_reported_in_place[Ok(0, …), Err(Vanished { field: 1 })]Disable runs, each restored from the committed state afterwards:
checkcall inborrow_alla_refused_borrow_all_borrows_nothingandborrow_all_checks_once_…a_vanished_lane_is_reported_in_placecargo fmt,cargo clippy -p lance-graph-dt64 --all-targets -D warningsandcargo test -p lance-graph-dt64are clean (59 + 33 + 15 + 2 tests).The board entry is
.claude/board/entries/2026-11-10-dt64-lane-borrow-all.md. Once this lands, #1987's lab can switch from its hand-rolledcheck+addr+borrowtoborrow_all.Generated by Claude Code