]> Savannah Git Hosting - gnulib.git/commit
localeinfo: ->simple would be wrong for LC_ALL=C
authorJim Meyering <meyering@fb.com>
Tue, 31 Dec 2019 07:23:42 +0000 (23:23 -0800)
committerJim Meyering <meyering@fb.com>
Tue, 31 Dec 2019 07:23:42 +0000 (23:23 -0800)
commit72e357240fac86530a9b9fdfad56c0a1619c7b5b
tree4c9fba8889990669191d4929f025809a2e3557c0
parent374b76ee6ac9244cab2b2d4591f57587fc5cdfee
localeinfo: ->simple would be wrong for LC_ALL=C

That would lead to using unnecessary and expensive code paths in dfa.c.
* lib/localeinfo.c (using_simple_locale): Fix recently-introduced logic
error that would have made grep many times slower in the C locale.
With this change, and a file created like this:
  yes 00 | head -10000000 > in
Running grep as follows becomes more than 40 times faster:
  LC_ALL=C grep -Fw 0 in
ChangeLog
lib/localeinfo.c