Skip to content

Fast path optimization and reduce the data#108

Merged
cometkim merged 2 commits intomainfrom
hangul-inlining
Dec 14, 2025
Merged

Fast path optimization and reduce the data#108
cometkim merged 2 commits intomainfrom
hangul-inlining

Conversation

@cometkim
Copy link
Owner

@cometkim cometkim commented Dec 14, 2025

Two further optimizations:

  1. Remove inlined ranges from the data file.
  2. Add inlined range: 0xAC00-0xD7A3 (Hangul syllables) can easily be inlined.

The 1 is something I forgot in #104 task, but it was a slight chance.

Btw, the number 2 is a huge finding. It is a pretty extensive range to be newly inlined.
Applying both optimizations significantly reduced the bundle size and memory footprint.

  • Size(min): 12,549 bytes -> 6,846 bytes (-45.5%)
  • Size(min+gz): 5,314 bytes -> 3,449 bytes (-35.1%)
  • Index memory usage: 14,272 bytes -> 8,686 bytes (-39.2%)

Of course, without perf regression.

@changeset-bot
Copy link

changeset-bot bot commented Dec 14, 2025

🦋 Changeset detected

Latest commit: 76f4066

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
unicode-segmenter Patch

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

@codspeed-hq
Copy link

codspeed-hq bot commented Dec 14, 2025

CodSpeed Performance Report

Merging #108 will not alter performance

Comparing hangul-inlining (76f4066) with main (65c38ce)

Summary

✅ 6 untouched

@codecov
Copy link

codecov bot commented Dec 14, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (65c38ce) to head (76f4066).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #108   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           10        10           
  Lines          948       954    +6     
=========================================
+ Hits           948       954    +6     

☔ View full report in Codecov by Sentry.
📢 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.

@cometkim cometkim marked this pull request as ready for review December 14, 2025 22:15
@cometkim cometkim merged commit 8b23df9 into main Dec 14, 2025
7 checks passed
@cometkim cometkim deleted the hangul-inlining branch December 14, 2025 22:16
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