-
-
Notifications
You must be signed in to change notification settings - Fork 158
perf: field-value call arguments keep the proven-this clone; subclass push arm ahead of the tracked resolver (wolf-ecs −11.2% / −11.9%) #8921
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
Merged
proggeramlug
merged 5 commits into
PerryTS:main
from
proggeramlug:perf/ecs-proven-this-call-args
Aug 28, 2026
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
46414f0
perf(codegen): field-value arguments to sibling methods keep the prov…
79dbac4
perf(runtime): object-backed subclass push arm ahead of the tracked r…
e4a7cde
changelog: fragment for #8921
2ef0054
runtime: clear main's -D warnings errors (dangling doc, test-only met…
119384e
fix(gc): keep the layout-table test helpers, whose callers #8923 rest…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| Compiler and Array performance: a method that passes a declared field's value | ||
| to a sibling method (`this.m(this.items[i])`) keeps its proven-receiver clone | ||
| instead of re-proving `this` at every site of its public body; and the | ||
| generic and spec Array push entries append to an object-backed Array | ||
| subclass through its dense fast path before consulting the tracked | ||
| allocator resolver. wolf-ecs (noctjs/ecs-benchmark) on the Mac mini | ||
| reference box, 2-second window: add/remove -11.2%, entity-cycle -11.9%, | ||
| 11/11 paired wins each; semantics probes byte-identical to Node. |
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
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
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
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
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
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
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
Oops, something went wrong.
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.
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.
🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift
🔎 Supported by static analysis
🏁 Script executed:
Repository: PerryTS/perry
Length of output: 50369
🏁 Script executed:
Repository: PerryTS/perry
Length of output: 36042
🏁 Script executed:
Repository: PerryTS/perry
Length of output: 50370
🏁 Script executed:
Repository: PerryTS/perry
Length of output: 50369
🏁 Script executed:
Repository: PerryTS/perry
Length of output: 50369
🏁 Script executed:
Repository: PerryTS/perry
Length of output: 50369
🏁 Script executed:
Repository: PerryTS/perry
Length of output: 30933
🏁 Script executed:
Repository: PerryTS/perry
Length of output: 48029
🏁 Script executed:
Repository: PerryTS/perry
Length of output: 50369
🏁 Script executed:
Repository: PerryTS/perry
Length of output: 50369
🏁 Script executed:
Repository: PerryTS/perry
Length of output: 33165
🏁 Script executed:
Repository: PerryTS/perry
Length of output: 13328
🏁 Script executed:
Repository: PerryTS/perry
Length of output: 9273
Do not treat effectful indexed arguments as
this-safe.expr_this_saferecursively acceptsthis.field[key], butjs_array_get_index_or_stringcan execute user code while coercing a non-numeric key. That code can change the receiver shape after the outer$pshapeproof. A subsequent raw field access in the clone can then read the wrong slot. This applies to boththis.m(...)andsuper.m(...).Restrict the safe case to side-effect-free indexed reads, or re-check the receiver shape after evaluating effectful arguments. Add regressions for both call forms.
🤖 Prompt for AI Agents