bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: grep LC bug if fixed would make grep 1000 times faster


From: Aharon Robbins
Subject: Re: grep LC bug if fixed would make grep 1000 times faster
Date: Wed, 20 Oct 2004 10:03:12 +0200

> To: address@hidden
> Cc: address@hidden
> Subject: Re: grep LC bug if fixed would make grep 1000 times faster
> From: Dan Jacobson <address@hidden>
> Date: Wed, 20 Oct 2004 05:57:43 +0800
>
> The correct solution should not penalize the C locale at all, it seems.
> S> What I meant was that I have to be very careful so that grep won't
> S> sudennly give incorrect results under the good old C locale.
> As all the problems begin after non C is detected, then just work on
> that part and C will be safe.

It's not that simple.  The code is interwined in lots of twisty passages,
and it's hard to make sure that a change in one place hasn't broken another.

> Or whatever. Anyway, thanks for making it a priority. Just as a user
> this slows things up so much. I can't imaging what would happen if
> from init(1) the whole machine was non C...

Actually, that's probably what you have, and that is certainly the goal
for the POSIX locale stuff and the way glibc and most of GNU and Linux
are headed.  The grep speed problems seem to be an exception, rather
than the rule. Although multibyte stuff is uniformly slower than
single-byte, it's usually not quite so pronounced.

Stepan, maybe you should just send him the "gofast" patch and let him
try it out. I suspect that the fact that it breaks gawk has to do with
the way gawk buffers data being different from how grep does it.

Arnold




reply via email to

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