GNU bug report logs - #16232
[PATCH] grep: make --ignore-case (-i) faster (sometimes 10x) in multibyte locales

Previous Next

Package: grep;

Reported by: Jim Meyering <jim <at> meyering.net>

Date: Mon, 23 Dec 2013 22:40:02 UTC

Severity: normal

Tags: patch

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Jim Meyering <jim <at> meyering.net>
To: Aharon Robbins <arnold <at> skeeve.com>
Cc: 16232 <16232 <at> debbugs.gnu.org>, Paul Eggert <eggert <at> cs.ucla.edu>
Subject: bug#16232: [PATCH] grep: make --ignore-case (-i) faster (sometimes 10x) in multibyte locales
Date: Thu, 20 Feb 2014 16:54:54 -0800
PS. if anyone has really slow hardware on which they can
exercise this test, I'd appreciate your letting me know if you can make
this new test fail.  I chose the "4-second" limit presuming that there are
few systems slow enough that they'd take longer than that.

Technically, you could probably test with grep-2.16, if that's easier
(but not 2.17).  Run these commands:

  grep --version
  yes $(printf '%078d' 0)|head -50000 > k
  env LC_ALL=ja_JP.eucJP time grep -i foobar k

[use src/grep in place of "grep" above, if you're testing just-build grep
 -- but in that case, you can just run "make check"]

and let me know if it takes longer than 4 seconds.
Ideally, I would compare timings of two commands, one with the offending
locale, and the other with LC_ALL=C.  That would eliminate the scaling issue.




This bug report was last modified 11 years and 82 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.