0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-29 23:16:30 +01:00
nodejs/benchmark/misc
Anna Henningsen ab841d5fba 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%

PR-URL: https://github.com/nodejs/node/pull/29301
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Minwoo Jung <minwoo@nodesource.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2019-09-02 21:02:34 -07:00
..
arguments.js benchmark: refactor for consistent style 2019-02-06 22:18:31 -08:00
freelist.js lib: faster FreeList 2019-04-11 05:40:59 +02:00
getstringwidth.js lib: add ASCII fast path to getStringWidth() 2019-09-02 21:02:34 -07:00
object-property-bench.js
print.js benchmark: add benchmark for node -p 2019-04-28 14:46:27 +08:00
punycode.js benchmark: refactor for consistent style 2019-02-06 22:18:31 -08:00
startup.js benchmark: refactor for consistent style 2019-02-06 22:18:31 -08:00
trace.js
util-extend-vs-object-assign.js