Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib: add ASCII fast path to getStringWidth() #29301

Closed
wants to merge 4 commits into from

Commits on Aug 25, 2019

  1. lib: add ASCII fast path to getStringWidth()

    A lot of strings that are going to be passed to `getStringWidth()`
    are ASCII strings, for which the calculation is rather easy and
    calling into C++ can be skipped.
    
                                                           confidence improvement accuracy (*)    (**)   (***)
         misc/getstringwidth.js n=100000 type='ascii'            ***    328.99 %      ±21.73% ±29.25% ±38.77%
         misc/getstringwidth.js n=100000 type='emojiseq'                  2.94 %       ±7.66% ±10.19% ±13.26%
         misc/getstringwidth.js n=100000 type='fullwidth'                 4.70 %       ±5.64%  ±7.50%  ±9.76%
    addaleax committed Aug 25, 2019
    Configuration menu
    Copy the full SHA
    7e2e2ef View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9f726cb View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8afd07e View commit details
    Browse the repository at this point in the history

Commits on Aug 30, 2019

  1. Configuration menu
    Copy the full SHA
    1a90c4c View commit details
    Browse the repository at this point in the history