Closed cometkim closed 2 months ago
Latest commit: 319266fc4eac8b87127e1d1f534567b5285b1708
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 100.00%. Comparing base (
3ea5a2d
) to head (319266f
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
https://github.com/cometkim/unicode-segmenter/pull/24/commits/3b0870a96245c9ab962c9ce62d1c1a097e727136 makes ~7% of perf improvement (404ns -> 377ns)
https://github.com/cometkim/unicode-segmenter/pull/24/commits/55cbc0cb1a158e13f3706659412474bd56d7c63a also made ~4% improvement (404ns -> 387ns)
Total, it will be ~13% faster (404ns -> 356ns) in the right next release!
So it's now 7 times faster than graphemer
, 6.5 times faster than Intl.Segmenter
.
updated benchmark, a bit verbose but way more realistic
Skips one redundant comparison per loop and escapes earlier.
This removes a
@ts-ignore
-ed path too!