On Wed, May 01, 2013 at 04:28, J?r?mie Courr?ges-Anglas wrote:
> Ted Unangst writes:
>
>> For simple patterns, grep has an optimization to avoid regex and run
>> about 50% faster. The problem is its idea of simple patterns is too
>> simple.
>
> IIUC the idea is to optimize for a lazy user that d
Ted Unangst writes:
> For simple patterns, grep has an optimization to avoid regex and run
> about 50% faster. The problem is its idea of simple patterns is too
> simple.
IIUC the idea is to optimize for a lazy user that didn't want to
type grep -F or fgrep:
$ grep foo /bar
$ grep -R foo /baz/
For simple patterns, grep has an optimization to avoid regex and run
about 50% faster. The problem is its idea of simple patterns is too
simple.
This diff switches the logic around from a whitelist to a blacklist. We
only need to abort the fast path if we see a magic regex character.
Index: util.