bug-bash
[Top][All Lists]
Advanced

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

Re: Bad performance for substring replacement by pattern


From: Chet Ramey
Subject: Re: Bad performance for substring replacement by pattern
Date: Wed, 04 Aug 2010 13:40:57 -0400
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.7) Gecko/20100111 Lightning/1.0b1 Thunderbird/3.0.1

On 8/3/10 5:23 PM, Eric Blake wrote:

> But why not teach the matcher the difference between a fixed-length
> pattern, vs. one that has * or other extended globbing that would cause
> a variable length match?  That is, since you know that [^;] can match at
> most one character, there is no need to search from the current position
> to the end of the string on each iteration - just search the first byte
> of the string.

I could do that, and that's probably the best way to approach this, but
it doesn't exist in the current implementation.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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