Repository navigation
Conversation
Both were measured on starship before landing. The I2 ceiling (unchecked indexing, cheaper than any cache) moved cycles ~1.5%, and the I3a fuel countdown moved them 0.4%. Both are inside the noise, so they fail the ADR's own gate. Isolated variants also showed code-layout effects of +-7%, larger than either change, so the numbers are recorded to keep anyone from retrying these without first making the countdown register-resident.
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The I2 ceiling is not technically established, and supporting details include an inaccessible artifact and inaccurate call-site count.
Review effort: Balanced
Findings: 3
Open (3)
What changed in this PR
Documents performance experiments rejecting ADR 0039’s I2 and I3 optimizations.
Changes:
- Records benchmark results and rejection rationale.
- Updates ADR status and consequences.
| File | Description |
|---|---|
docs/adr/0039-per-call-fixed-cost.md |
Records rejected interpreter optimizations and measurements. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+104
to
+107
| - The ceiling was measured first. Both fetch sites were switched to `get_unchecked` (an | ||
| experiment only), which is cheaper than any cache could be. On starship (`o.n` loop, | ||
| interleaved rounds against master 9c4f5877, 2026-09-29), instructions fell 4.3% but | ||
| cycles fell only ~1.5%, inside run-to-run noise. |
| - `RUBYRS_FUEL` stayed exact, because every op took the slow path while metered. | ||
| - The deadline cadence was unchanged. | ||
| - Tier 2's settle gate read an exact derived `op_count()`. | ||
| - The patch is kept as `a4-tmp/i3a-countdown.diff` on the Studio's DevSSD. |
| - **What would remove the cost.** The countdown would have to live in a register, as a | ||
| local of the dispatch loop, which means taking `check_fuel` out of `step()`. | ||
| - `step()` is also driven by tier 2 and by the iterator drivers. | ||
| - `check_fuel` has 23 call sites. |
Probing the explicit-recv IC first gave -4.4% cycles on the o.n loop, but it regressed builtin-resolving calls. The semantics-preserving version kept only -1.7% while adding two instructions per iteration, so the earlier gain was mostly code layout.
This branch has not been deployed
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.

Records the measured rejection of ADR 0039's I2 (code pointer cache) and I3 (safe-point countdown). Part of #378 / #385.
get_unchecked, which is cheaper than any cache) cut instructions 4.3% but cycles only ~1.5%, inside noise on starship.RUBYRS_FUELexact. It cut instructions 7% but cycles only 0.4% (10.284 → 10.240e9, 8-round medians). Folding in the SIGINT check was not attempted, because it would change when atraphandler runs after a self-sentProcess.kill.check_fuelalone made the loop 7% slower. Code-layout effects at this scale are bigger than either change.The ADR's status is now: I1 shipped, I2/I3 rejected, I4/I5 planned. This PR changes docs only.
🤖 Generated with Claude Code