bug#21696: [PATCH 1/2] grep: improvement of performance of grep -Fw

2015-10-16 Thread Norihiro Tanaka
I found that grep -Fw is extremely slow in spite of whether in multibyte locales or not. $ yes 'abcdefg hijklmn opqrstu vwxyz' | head -10 >k $ time -p env LC_ALL=C grep -Fw vwxy k real 14.03 user 12.51 sys 0.74 $ time -p env LC_ALL=ja_JP.eucJP grep -Fw vwxy k real 14.29 user 12.67 sys 0.50 $

bug#21696: [PATCH 1/2] grep: improvement of performance of grep -Fw

2015-10-16 Thread Paul Eggert
Thanks for those performance improvements. I installed them, with some minor changes to commentary. I also installed a couple of minor tweaks to the code, to use memrchr and to simplify the multibyte test. Attached are the revised set of patches. From a341e981fec14f3a76e88bca3e40fdbc98539cf8 Mon