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


Message #83 received at 16232 <at> debbugs.gnu.org (full text, mbox):

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: Re: bug#16232: [PATCH] grep: make --ignore-case (-i) faster
 (sometimes 10x) in multibyte locales
Date: Thu, 20 Feb 2014 12:42:06 -0800
[Message part 1 (text/plain, inline)]
On Thu, Feb 20, 2014 at 9:22 AM,  <arnold <at> skeeve.com> wrote:
> Hi Jim.
>
> Why copy the using_utf8() routine out of dfa.c?  Why not just link
> to it instead?  If it's static, make it extern... That way if the
> logic ever changes then it only has to be changed in one place.

Hi Arnold,

That was due to my reflex of avoiding unnecessary change to dfa.c,
but in this case, it is definitely better to do as you suggest, not
just to avoid code duplication, but also for run-time efficiency:
with two copies of the function, there would have been two calls to
nl_langinfo per run; with only that one copy, we save a call, too.

Revised commits attached.

Thanks,
Jim
[k.txt (text/plain, attachment)]

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.