-
-
Notifications
You must be signed in to change notification settings - Fork 158
perf: ECS command path follow-up to #8872 — −40% on the codehz/ecs 5k-entity sync row #8885
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
Closed
proggeramlug
wants to merge
23
commits into
PerryTS:main
from
proggeramlug:perf/ecs-typedid-followup2
Closed
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
81515f9
perf(ecs): typed branded ids, inline dynamic compares, Map heal of fo…
3477802
perf(runtime): clean_arr_ptr fast lane via the cached generation clas…
8b0a2b5
perf: dedupe resolved alias unions, 16-way page-generation cache, sin…
0588359
perf(arena): keep the 4-way page-generation cache (16 ways regressed …
fa91aa4
perf(runtime): js_array_length plain-array fast lane; inline old→youn…
8b1caf5
perf(gc): build class key arrays under ImmortalLayoutScope so they ne…
b3856ff
perf(transform): beta-reduce called arrow-literal locals and drop dea…
f76fa8a
perf(transform): follow copy aliases of a reduced callback local
e0078f5
perf: process-global address sketch ahead of the per-object layout pr…
313c39c
perf: inline the per-object layout address sketch in the construction…
0d7d77e
perf(gc): objects and closures below eight payload slots take the tag…
f2c7c1a
perf(gc): count an in-flight array append as a live slot in the per-o…
96ad0ba
perf(gc): prune dead per-object layout records at every collection an…
411bcc7
perf(runtime): strict array store lane skips the registry probes and …
e746d7f
perf(runtime): resolve array header flags once in pop/set_length; lat…
e33a93b
perf(codegen): hoist the STRING_TAG test of js_string_addref_if_heap_…
57319a8
perf(runtime): typeof result-string cache on hot TLS; drop the unreso…
370fdfd
perf(gc): validated-parent write barrier entry for codegen's generati…
08572a5
perf(codegen): read plain closure captures with an inline load instea…
fbb6fe1
perf(runtime): length = 0 keeps an all-pointer array all-pointer
cce40a3
chore: keep the follow-up under the lint gates
f835ef3
changelog: #8885 ECS command-path follow-up
f1177e3
chore: drop the stale cold thread-local entries for arithmetic.rs and…
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,18 @@ | ||
| Removed most of the remaining GC-bookkeeping and dispatch overhead on the ECS | ||
| command path (follow-up to #8872). General compiler/runtime mechanisms: | ||
| branded `number & {…}` intersections and generic/imported type aliases now | ||
| lower to their primitive (they were `Any`, so every entity id was dynamic); | ||
| inline plain-double fast paths for dynamic compares and truthiness; | ||
| beta-reduction of called arrow-literal locals left behind by inlining; | ||
| `Map.get` heals stale array-growth forwarding stubs in place; a header-bit | ||
| fast lane in `clean_arr_ptr` and every strict array helper; a process-global | ||
| address sketch, an object/closure per-object-mask threshold of eight slots, a | ||
| death prune for the per-object layout tables and a live-young-record count | ||
| that together let the inline allocator skip the stale-layout probe; the | ||
| strict store lane, `pop` and `length =` resolve the header once; the | ||
| dirty-page and `typeof` caches move to hot TLS; the string-demote tag test | ||
| and plain closure-capture reads are inlined; a validated-parent write-barrier | ||
| entry; and `length = 0` keeps an all-pointer array all-pointer. On the | ||
| upstream `codehz/ecs` "5k entities: 3 commands each + sync" row the compiled | ||
| benchmark went from 7.30 ms/op to ~4.7 ms/op (−36%, paired runs on an idle | ||
| Mac mini; Node 26.5.1 is 1.76 ms/op). | ||
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
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.
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.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 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: 35365
🌐 Web query:
PerryTS perry pull request 8885 "7.296" "4.388" codehz/ecs💡 Result:
The provided query does not refer to a single, coherent technical subject, but rather concatenates multiple unrelated entities and data points: 1. PerryTS (Perry) is a native TypeScript compiler written in Rust [1]. There is no "pull request 8885" associated with this project; its pull requests are numbered significantly lower (e.g.,
#224,#322,#5739) [2][3][4]. 2. codehz/ecs is an independent, high-performance Entity Component System (ECS) library for TypeScript and Bun [5][6]. 3. The values "7.296" and "4.388" appear to be unrelated to the aforementioned software repositories. In bioinformatics and structural biology databases (such as the RCSB Protein Data Bank), these numbers are commonly found as coordinates within PDB (Protein Data Bank) file entries for atomic positions [7][8][9][10][11]. There is no evidence of a connection between "pull request 8885," the PerryTS project, the codehz/ecs library, and these coordinate values.Citations:
🏁 Script executed:
Repository: PerryTS/perry
Length of output: 1385
Use the canonical
codehz/ecsbenchmark result.The PR reports 7.296 ms/op → 4.388 ms/op (−40%) for the same row. The current 7.30 ms/op → ~4.7 ms/op (−36%) figures do not match. Identify ~4.7 as a separate run or replace it with the canonical values.
🤖 Prompt for AI Agents