perf: layout probe declines functions with accessors (Array.isBuffer via Symbol.species)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 55/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- rust, typescript
- Domain
- compilers, performance
Research direction
Start by reading the layout probe and the existing ordinary object handling; the issue does not name their files, so locate them in the repository. Check how accessor hits decline to an accessor call and how the probe continues to %Function.prototype%'s sealed layout. Done means function shapes with accessors can answer own data keys and absence, with qs stringify and instructions:u serving as the witness.
Written by the indexing model from the issue text.
Description
Follow-up to #12716 for qs stringify, which stays flat after it.
qs's main remaining declined read is Array.isBuffer, from obj.constructor.isBuffer with an array receiver. The Array constructor carries the Symbol.species accessor, which takes it off the plain function shape, so the layout probe declines it and the read takes the slow by-name path. Node answers undefined without a walk.
console.log(Object.getOwnPropertySymbols(Array).map(String)); // [ 'Symbol(Symbol.species)' ]
console.log(Array.isBuffer, Object.isBuffer); // undefined undefined
Fix direction: the probe answers own data keys and absence for functions whose shape also holds accessors, the way it does for ordinary objects (an accessor hit declines into the accessor call), and continues to %Function.prototype%'s sealed layout. Witness: qs stringify, instructions:u.
- Dominant language
- Rust
- Stars
- 4.9k
- Forks
- 166
- Avg merge
- 2h 20m
- Merged PRs (30d)
- 916
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
-
priority: medium
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
storytold/photocraft#8041 · 1 comment ·
Maintainers usually reply within 1 day
-
documentation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
writerslogic/holographic-memory#96 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 63/100
Maintainers usually reply within 1 day
-
bug good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
engine-rs P3 review-deferral wasm
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
maniator/verticopolis#1154 ·
Maintainers usually reply within 1 day