]> git.ipfire.org Git - thirdparty/coreutils.git/commit
wc: 3× speedup in C locale
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 23 Sep 2023 05:09:37 +0000 (22:09 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 23 Sep 2023 07:28:27 +0000 (00:28 -0700)
commit17a9e79023fd98886f8e7e673965f61ec9569f6c
tree6167e69c67bf502cacc2b07dcf98fc199fffa6c3
parentbee39b93f54c4df105ba8b528c9637d67d16d21f
wc: 3× speedup in C locale

The 3× speedup was measured by invoking 'wc $(find * -type f)'
on the coreutils sources etc. on an Ubuntu 23.04 x86-64.
These changes also speed up wc 20% in UTF-8 locales.
* src/wc.c (wc_isprint, wc_isspace): New static vars.
(wc): Use them for speed.
(main): Initialize them if needed.
(isnbspace): Remove; no longer used.
NEWS
src/wc.c