-
Notifications
You must be signed in to change notification settings - Fork 0
perf(interp): fuse arithmetic-to-local stores and array loads #167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -124,6 +124,19 @@ do not block future allocations. | |||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| Public host APIs that allocate, such as `Alloc`, `Push`, and `Marshal`, return `ErrHeapExhausted` as ordinary errors. | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| ### Reset-time reference-array header reuse | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| `Reset` invalidates every live dynamic object. Before clearing those slots, the | ||||||||||||||||||||||||||||||||||||||
| interpreter keeps released `*types.Array` headers in an interpreter-local pool | ||||||||||||||||||||||||||||||||||||||
| capped by that run's dynamic heap size. VM array construction, slicing, and map | ||||||||||||||||||||||||||||||||||||||
| key extraction may reuse those headers on the next run. | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| Only the Go object header is reused. `Typ` and `Elems` are cleared at reset, and | ||||||||||||||||||||||||||||||||||||||
| every new array receives a fresh element backing store, so zeroing and retained | ||||||||||||||||||||||||||||||||||||||
| memory behavior stay unchanged. Arrays detached through `Pop` or reclaimed | ||||||||||||||||||||||||||||||||||||||
| before reset are not pooled; their returned Go values remain intact. `Close` | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+129
to
+137
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win Clarify Reset’s ownership scope. “Every live dynamic object” contradicts the following Proposed fix-`Reset` invalidates every live dynamic object. Before clearing those slots, the
+`Reset` invalidates every dynamic object still owned by the interpreter. Before clearing those slots, the📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||
| drops the pool. | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| ## GC | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| GC uses trial deletion to derive roots from exact reference counts instead of | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Correct the future-dated measurement claim.
As of July 30, 2026, the document cannot truthfully state that minivm was re-measured on July 31, 2026. Replace it with the actual completed measurement date, or defer this documentation update until those measurements exist.
🧰 Tools
🪛 LanguageTool
[grammar] ~25-~25: Ensure spelling is correct
Context: ...26 with three sequential samples. Every minivm row was re-measured on July 31, 2026 fr...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
🤖 Prompt for AI Agents