[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/2] tests: add test for newly-fixed performance problem
From: |
Aharon Robbins |
Subject: |
Re: [PATCH 2/2] tests: add test for newly-fixed performance problem |
Date: |
Wed, 05 May 2010 20:41:35 +0300 |
User-agent: |
Heirloom mailx 12.4 7/29/08 |
> From: Jim Meyering <address@hidden>
> To: Paolo Bonzini <address@hidden>
> Date: Wed, 05 May 2010 12:05:20 +0200
> Cc: address@hidden
> Subject: Re: [PATCH 2/2] tests: add test for newly-fixed performance problem
>
> Paolo Bonzini wrote:
> > On 05/04/2010 07:32 PM, Jim Meyering wrote:
> >> $(AWK) 'BEGIN {for (i=0; i<13000; i++) print "aba"}' > in || fail=1
> >
> > Isn't an extra /dev/null needed?
>
> Probably, for some versions of awk, but at least for gawk it's not --
> in that this does not "hang":
>
> gawk 'BEGIN {for (i=0; i<13000; i++) print "aba"}' > in
>
> To be on the safe side, the test now does this:
>
> $AWK 'BEGIN {for (i=0; i<13000; i++) print "aba"}' /dev/null > in
For any version of "new" awk, the /dev/null isn't needed. But with
old awk, including the Solaris /usr/bin/awk, it is necessary. In sum,
it doesn't hurt, and it broadens the set of awks for which the code will
work as desired.
HTH,
Arnold
Re: [PATCH 1/2] dfa: convert to wide character line-by-line, Jim Meyering, 2010/05/05