Re: Bad performance for substring replacement by pattern

2010-08-04 Thread Chet Ramey
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

Re: Bad performance for substring replacement by pattern

2010-08-03 Thread Eric Blake
On 08/03/2010 03:12 PM, Chet Ramey wrote: > On 7/12/10 4:27 PM, Yi Yan wrote: >> >> Hi, >> >> I used the following Bash script to test substring replacement operator. >> It is performance get worse very quickly with the increasing of the string >> length. > > This is a pathological case. I d

Re: Bad performance for substring replacement by pattern

2010-08-03 Thread Chet Ramey
On 7/12/10 4:27 PM, Yi Yan wrote: > > Hi, > > I used the following Bash script to test substring replacement operator. > It is performance get worse very quickly with the increasing of the string > length. This is a pathological case. I don't really see how to optimize it very well. The p

Re: Bad performance for substring replacement by pattern

2010-07-18 Thread Linda Walsh
Yi Yan wrote: Hi, I used the following Bash script to test substring replacement operator. It is performance get worse very quickly with the increasing of the string length. I test the script with Bash(4.1) on Debian Linux machine. See the execution time difference by increasing

Bad performance for substring replacement by pattern

2010-07-13 Thread Yi Yan
Hi, I used the following Bash script to test substring replacement operator. It is performance get worse very quickly with the increasing of the string length. I test the script with Bash(4.1) on Debian Linux machine. See the execution time difference by increasing the $NUM in the