Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mattn/go-runewidth
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.0.22
Choose a base ref
...
head repository: mattn/go-runewidth
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.0.23
Choose a head ref
  • 2 commits
  • 1 file changed
  • 1 contributor

Commits on Apr 8, 2026

  1. Optimize RuneWidth and StringWidth performance

    - Merge combining+nonprint into a single zerowidth table at init,
      reducing two binary searches to one for zero-width rune detection
    - Merge ambiguous+doublewidth into widewidth table for EastAsian path
    - Remove redundant narrow table check in non-EastAsian path
    - Eliminate inTables variadic function overhead by using direct calls
    - Simplify EastAsian StrictEmojiNeutral dead code path
    - Add ASCII fast path in StringWidth to bypass grapheme segmenter
    - Use strings.Builder in Wrap to avoid O(n²) string concatenation
    
    Benchstat (8 samples):
    
      RuneWidthAll/regular         -34.49%
      RuneWidthAllEastAsian/regular -44.79%
      String1WidthAll/regular      -25.53%
      geomean                      -17.69%
    mattn committed Apr 8, 2026
    Configuration menu
    Copy the full SHA
    0a43bb8 View commit details
    Browse the repository at this point in the history
  2. Merge pull request #95 from mattn/optimize-runewidth-performance

    Optimize RuneWidth and StringWidth performance
    mattn authored Apr 8, 2026
    Configuration menu
    Copy the full SHA
    17a7a03 View commit details
    Browse the repository at this point in the history
Loading