perf: string .length not typed as number, so sums go through js_dynamic_string_or_number_add (str grid 4–18× node)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- rust, typescript
- Domain
- performance
Research direction
Start by tracing type lowering for .length on values proven to be strings, then follow how the resulting type selects the accumulator operation. The issue points to the §C1.4 string grid and reports js_dynamic_string_or_number_add as the costly path; inspect the relevant benchmark or tests and compare the generated behavior with Node. Done means string .length is lowered as a numeric value and the grid no longer takes that dynamic addition path.
Written by the indexing model from the issue text.
Description
Every operation in the §C1.4 str grid fails at 4–18× node. The cost is the consumer, not the access: a string's .length isn't known to be a number, so the accumulation takes js_dynamic_string_or_number_add. .length on a value proven to be a string is always a number (an int32 range), and the type lowering should carry that. Found by the one-path audit 2026-10-12 (secret-tests scratchpad/onepath-audit-20261012.md, main 38bc59e28b).
- Dominant language
- Rust
- Stars
- 4.9k
- Forks
- 166
- Avg merge
- 2h 54m
- Merged PRs (30d)
- 922
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
-
Difficulty 4/5 3-5 days Newbie friendliness 35/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
Similar issues
-
area:io needs-info needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 63/100
bherbruck/solvecraft#3216 · 1 comment ·
-
bug triage/needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
praxis-proxy/grid#412 ·
Maintainers usually reply within 1 day
-
priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 63/100
storytold/photocraft#7824 · 1 comment ·
Maintainers usually reply within 1 day
-
area:ui chore could help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Maintainers usually reply within 1 day