Repository navigation
lab(drf-p2): focus vs direct break-even + mis-predict/switch lease falsifier - #1763
Conversation
examples/p2_breakeven.rs times, per 4096-slot focus: a cold gather (build), one fold over the gathered column, and one direct read along the map with lookahead 16, then reports the crossover fold count N* = build / (direct - fold) and the A2 read-hit fraction at N*. Both paths are asserted equal before any number is printed. Reported, not gated. New test p2_mispredicted_focus_and_64_fast_switches_leave_no_lease_and_no_corruption: a predicted-but-unused focus and 63 abandoned switches are reclaimed by evict_unused; the two held foci stay correct. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2190696878
ℹ️ 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".
lab(drf-p2): cold-cache arm; correct the DRAM claim (stranded from #1763)
What
Follow-up to #1762, in the same lab crate. Timings are reported, not gated.
examples/p2_breakeven.rstimes one 4096-slot focus three ways:Each is measured warm (repeated reps) and cold (a 512 MiB buffer, twice the 260 MiB L3, is streamed outside the timed region before each rep). The probe then reports the break-even fold count for both. Both paths are asserted to return the same answer before any number is printed.
New test
p2_mispredicted_focus_and_64_fast_switches_leave_no_lease_and_no_corruption: a focus that was predicted but never used, plus 63 abandoned switches, are all reclaimed byevict_unused, and the two foci still held stay correct. Disabling eviction (keeping every entry) turns it red, together withl3.Warm vs cold
A focus reads one cache line per distinct ordinal. Here that is 248–256 KiB, whatever the row count, so repeated reps are warm even with 65 536 rows. Codex caught that this PR first labelled the 65 536-row warm numbers as DRAM; they are now relabelled warm, and the cold arm was added.
Result (median ns per call, AVX-512, fold body from ndarray #376; AVX2 within ~15%)
N* cold is the smallest N with
build_cold + N·fold < direct_cold + (N−1)·direct_warm.Open
Gates: 11/11 tests pass on native and on x86-64-v3;
clippy --all-targets -D warningsis clean.Board entry:
.claude/board/entries/2026-10-24-drf-p2-breakeven.md.🤖 Generated with Claude Code
https://claude.ai/code/session_01G22yT6htkcdyXsihxxXdrg