diff options
| author | Collin Funk <collin.funk1@gmail.com> | 2026-03-09 19:32:27 -0700 |
|---|---|---|
| committer | Collin Funk <collin.funk1@gmail.com> | 2026-03-09 20:06:07 -0700 |
| commit | e0190a9d1b208136bcd757f5f687d2451e5430d7 (patch) | |
| tree | 1d5b71d1fbefbfdacdfde9b96e1fa110202493e5 /scripts/git-hooks/commit-msg | |
| parent | a4cf72f5a798edcbe9502a53e6e9a042d9a1163d (diff) | |
| download | coreutils-e0190a9d1b208136bcd757f5f687d2451e5430d7.tar.gz coreutils-e0190a9d1b208136bcd757f5f687d2451e5430d7.zip | |
wc: improve aarch64 Neon optimization for 'wc -l'
$ yes abcdefghijklmnopqrstuvwxyz | head -n 200000000 > input
$ time ./src/wc-prev -l input
200000000 input
real 0m1.240s
user 0m0.456s
sys 0m0.784s
$ time ./src/wc -l input
200000000 input
real 0m0.936s
user 0m0.141s
sys 0m0.795s
* configure.ac: Use unsigned char for the buffer to avoid potential
compiler warnings. Check for the functions being used in src/wc_neon.c
after this patch.
* src/wc_neon.c (wc_lines_neon): Use vreinterpretq_s8_u8 to convert 0xff
into -1 instead of bitwise AND instructions into convert it into 1.
Perform the pairwise addition and lane extraction once every 8192 bytes
instead of once every 64 bytes.
Thanks to Lasse Collin for spotting this and reviewing a draft of this
patch.
Diffstat (limited to 'scripts/git-hooks/commit-msg')
0 files changed, 0 insertions, 0 deletions
