Use of Set for dictionaries
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 64
- Forks
- 26
- PR merge metrics
- No merged PRs in 30d
Description
Initially, I used a js object and hasOwnProperty to do the hashmap lookups and then later used Set and has().
It would be nice to standardize this, I'm just not familiar with the performance of Set vs. Object, I think if Set is faster/the same then we should use it.
I think one benefit of Set is that Object can possibly have issues with numeric keys?
cc/ @Joxit thoughts?
Contributor 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.
Research direction
Start by locating the hashmap lookups that currently use Object, hasOwnProperty, or Set and review how numeric keys are handled. Compare the relevant approaches with representative performance checks, then standardize the implementation based on the results. Done means the lookup strategy is consistent and its choice is supported by evidence.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100