CodePoints.uncons performance optimization?
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 45/100
- Issue type
- Refactor
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- javascript
- Domain
- performance
Research direction
Start with Data.String.CodePoints.uncons in src/Data/String/CodePoints.purs and the related helper in src/Data/String/Unsafe.js, then compare the referenced Data/Enum.js implementation. Confirm that the intermediate charAt slice can be avoided by using charCodeAt directly, while preserving uncons behavior.
Written by the indexing model from the issue text.
Description
It seems to me that these lines in Data.String.CodePoints.uncons
are first slicing the first code unit into a Char string with the JavaScript charAt method
and then converting the Char string to a CodePoint by the boundedEnumChar instance fromEnum method which calls the Javascript charCodeAt method.
We could skip the intermediate string slice of the charAt method and call charCodeAt directly.
- Dominant language
- PureScript
- Stars
- 57
- Forks
- 76
- PR merge metrics
- No merged PRs in 30d
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.
More from purescript/purescript-strings
-
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
purescript/purescript-strings#176 · 6 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
purescript/purescript-strings#171 · 3 comments · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
purescript/purescript-strings#170 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
purescript/purescript-strings#169 · 7 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 38/100
purescript/purescript-strings#167 · 4 comments ·
All issues in purescript/purescript-strings
Similar issues
-
react-doctor severity:warning tech-debt
Difficulty 1/5 Under an hour Newbie friendliness 88/100
digidem/comapeo-cloud-app#403 ·
-
area/sessions comp/agent P2 tool/skills type/perf
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
NousResearch/hermes-agent#117788 ·
-
type/automation type/performance
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100