Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

CodePoints.uncons performance optimization?

オープン
#154 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
45/100
issue の種類
リファクタリング
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
javascript
領域
performance

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

type: enhancement

It seems to me that these lines in Data.String.CodePoints.uncons

https://github.com/purescript/purescript-strings/blob/157e372a23e4becd594d7e7bff6f372a6f63dd82/src/Data/String/CodePoints.purs#L197-L198

are first slicing the first code unit into a Char string with the JavaScript charAt method

https://github.com/purescript/purescript-strings/blob/157e372a23e4becd594d7e7bff6f372a6f63dd82/src/Data/String/Unsafe.js#L5

and then converting the Char string to a CodePoint by the boundedEnumChar instance fromEnum method which calls the Javascript charCodeAt method.

https://github.com/purescript/purescript-enums/blob/170d959644eb99e0025f4ab2e38f5f132fd85fa4/src/Data/Enum.js#L4

We could skip the intermediate string slice of the charAt method and call charCodeAt directly.

主要言語
PureScript
スター
57
フォーク
76
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

purescript/purescript-strings のほかの issue

purescript/purescript-strings の issue をすべて見る

似ている issue

Performance の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。