perf: typed-array element access goes through js_dyn_index_get/set with GC barrier and string check; int32 elements compared generically
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- rust, typescript
- Domain
- compilers, performance
Research direction
Start with the binary-trees comparison sources in secret-tests/perf-drivers/programs/binarytrees_*.ts and inspect the compiler path that handles Int32Array indexing and relational comparisons. Compare generated behavior at the referenced main revision, 996bc5d629, with the expected typed loads, stores, and comparisons. Done when numeric element access avoids the generic helpers, unnecessary write barrier, and heap-string check, and the comparison uses int32 semantics.
Written by the indexing model from the issue text.
Description
L[i] on an Int32Array (module-level or class field) calls js_dyn_index_get / js_dyn_index_set_strict. Numeric stores also run a write barrier and a heap-string check, and L[i] < 0 uses js_rel_lt. Expected: a bounds check plus a typed load/store, int32-typed results, and no barrier on numeric stores. Related: #10515, #10516. Found with the binary-trees comparison (plain and arena variants; sources in secret-tests perf-drivers/programs/binarytrees_*.ts). Measured at main 996bc5d629. Lane: typedarr.
- Dominant language
- Rust
- Stars
- 4.9k
- Forks
- 166
- Avg merge
- 3h 23m
- Merged PRs (30d)
- 911
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from PerryTS/perry
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 67/100
Maintainers usually reply within 1 day
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 76/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
fritzprix/libr-agent#2165 ·
Maintainers usually reply within 1 day
-
area:ecosystem bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Chelis-Lang/chelis#3942 ·
Maintainers usually reply within 1 day
-
needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 63/100
Maintainers usually reply within 1 day
-
review-bot
Difficulty 1/5 Under an hour Newbie friendliness 90/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 86/100
Maintainers usually reply within 1 day