[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gawk] Computed regex and getline bug / issue
From: |
arnold |
Subject: |
Re: [bug-gawk] Computed regex and getline bug / issue |
Date: |
Sun, 11 May 2014 21:06:23 -0600 |
User-agent: |
Heirloom mailx 12.4 7/29/08 |
"Andrew J. Schorr" <address@hidden> wrote:
> Hi Arnold,
>
> On Sat, May 10, 2014 at 10:50:52PM +0300, Aharon Robbins wrote:
> > Indeed. Here is the fix for that too.
> >
> > Got the other test case, I'll push it.
>
> Great. Thanks. But with this new patch, is the previous one
> actually required? I tried backing it out, as per the attached patch,
> and it passes "make check" for me.
>
> Regards,
> Andy
Hi Andy. The previous change may not be required but it will buy us
some pico-efficiencies since we won't end up trying the read again a
few times and hitting EOF each time we pull more stuff out of the
buffer until we actually hit the end of the buffer. In the worst case
of say a 4096 byte buffer, with a zero character record and one character
separator, we could save 4000+ read calls that tell us we've hit EOF.
That's a worst case scenario and is likely to be not nearly so bad
in practice. :-)
The code is a little clearer as it stands now; I think I'd like to
leave it.
But that was an interesting question to think about.
Thanks!
Arnold
- [bug-gawk] Computed regex and getline bug / issue, Grail Dane, 2014/05/04
- Re: [bug-gawk] Computed regex and getline bug / issue, Davide Brini, 2014/05/04
- Re: [bug-gawk] Computed regex and getline bug / issue, Andrew J. Schorr, 2014/05/04
- Re: [bug-gawk] Computed regex and getline bug / issue, Aharon Robbins, 2014/05/09
- Re: [bug-gawk] Computed regex and getline bug / issue, Andrew J. Schorr, 2014/05/09
- Re: [bug-gawk] Computed regex and getline bug / issue, Aharon Robbins, 2014/05/10
- Re: [bug-gawk] Computed regex and getline bug / issue, Andrew J. Schorr, 2014/05/11
- Re: [bug-gawk] Computed regex and getline bug / issue,
arnold <=