bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#16232: [PATCH] grep: make --ignore-case (-i) faster (sometimes 10x)


From: Jim Meyering
Subject: bug#16232: [PATCH] grep: make --ignore-case (-i) faster (sometimes 10x) in multibyte locales
Date: Thu, 20 Feb 2014 12:42:06 -0800

On Thu, Feb 20, 2014 at 9:22 AM,  <address@hidden> 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

Attachment: k.txt
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]