Sparse Array objects impl
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 431
- Forks
- 20
- PR merge metrics
- No merged PRs in 30d
Description
It looks like SpiderMonkey, in the case of sparse arrays, fallbacks to simple property access* (i.e. arr[450] gets the '450' property, if any).
Wouldn't that work here for now, instead of creating a huge array? (for arrays > SOME_HUGE_VALUE, that is).
- It looks like SP uses some checks here and there to detect this case, based on the use-case.
Contributor guide
No contributing guide indexed for this repository
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.
Research direction
Start by locating the runtime code that creates and accesses array objects, then trace how sparse arrays and very large indices are handled. Compare that path with the issue's SpiderMonkey reference and determine how property access should behave above SOME_HUGE_VALUE. Done means sparse arrays no longer require allocating a huge backing array while indexed properties still work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100