Skip to content

Version Packages - #145

Merged
cometkim merged 1 commit into
mainfrom
changeset-release/main
Jul 26, 2026
Merged

Version Packages#145
cometkim merged 1 commit into
mainfrom
changeset-release/main

Conversation

@github-actions

@github-actions github-actions Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

unicode-segmenter@0.17.2

Patch Changes

  • 7374446: Removed pinned graphemeSegments() in the module scope to make all APIs able to be three-shaken properly.

    It was introduced when they all use graphemeSegments() as the core. But now they are all have their own loop.

  • 957898b: Optimize the hot loop based on a deep analysis of the V8 optimization chain.

    As the result, the bundle size, speed, and memory usage. All three axes are improved. See PR #144 for detailed explanation.

    • Bundle: −4.2% min+gzip, −3.9% min+brotli on unicode-segmenter/grapheme (2,453 → 2,351 gzip); −3.4% / −2.8% on the full entry
    • Hermes bytecode: −20.6% (20,015 → 15,892 bytes), −18.6% gzipped
    • Runtime (Node.js/V8, per benchmark case)
      • splitGraphemes() 1.5–2.2x, countGraphemes() 1.20–1.43x, graphemeSegments() 1.05–1.21x, collectGraphemes() 1.01–1.19x.
      • Bun/JSC gains are larger, and the interpreter tiers (Hermes, QuickJS) improve 5–23%
    • Memory: lookup tables 20.6 kB → 19.1 kB, retained heap 228 kB → 218 kB, module init 1.7 ms → 1.5 ms

    The state compaction strategy is the major part. It is valid across all optimization tiers of the V8 runtime (Jitless, Maglev, TurboFan) and has been consistently improved across all other engines.

    Another noticeable change is splitGraphemes(), it now owns its loop, just like countGraphemes().
    It produces a 30-60% performance improvement. The size increase is roughly free after compression, since the fourth byte-aligned copy of the loop back-references the other three. And the uncompressed size is amortized by other improvements.

    All the analysis have done by Claude Opus 5, well-done!

@github-actions
github-actions Bot force-pushed the changeset-release/main branch from 079c176 to df443a5 Compare July 26, 2026 19:35
@github-actions
github-actions Bot force-pushed the changeset-release/main branch from df443a5 to dceb7fd Compare July 26, 2026 19:55
@pkg-pr-new

pkg-pr-new Bot commented Jul 26, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/unicode-segmenter@145

commit: dceb7fd

@codecov

codecov Bot commented Jul 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (7374446) to head (dceb7fd).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #145   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            9         9           
  Lines         1045      1045           
=========================================
  Hits          1045      1045           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@codspeed-hq

codspeed-hq Bot commented Jul 26, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 48 untouched benchmarks


Comparing changeset-release/main (dceb7fd) with main (7374446)

Open in CodSpeed

@cometkim
cometkim merged commit dd517de into main Jul 26, 2026
6 checks passed
@cometkim
cometkim deleted the changeset-release/main branch July 26, 2026 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant