Re: glibc test time regression after gawk update

"H.J. Lu" <[email protected]>
Newsgroups gmane.comp.lib.glibc.alpha,gmane.comp.gnu.gawk.bugs
Message-ID <CAMe9rOqdrNr9eBx1QraZojZzjf0W2fMPy8r1kgNa7YvMc2RSzg@mail.gmail.com>
On Mon, Jul 6, 2026 at 7:19 AM Sam James <[email protected]> wrote:
>
> [email protected] writes:
>
> > Hi.
>
> Hi Arnold,
>
> >
> > I suspect that the problem is line 34 in the script:
> >
> >       value = gensub(/^(INF|NAN|inf|nan)/, "+\\1", 1, val)
> >
> > There was a bug in gensub with \N escapes that has been fixed.
> > Can you try with https://www.skeeve.com/gawk/gawk-5.4.0d.tar.gz?
> >
> > FYI, feedback on this ASAP would be really good, as I am planning
> > to release 5.4.1 this week.

Which gawk commit may fix this?

> Sorry for the delay, I'd tried to find time earlier this week but events
> got the better of me.
>
> It looks like it solves the problem:
> ```
> $ hyperfine "make test t=stdio-common/tst-printf-format-vas-double-f AWK=/tmp/gawk-5.4.0/bin/gawk" "make test t=stdio-common/tst-printf-format-vas-double-f AWK=/tmp/gawk-5.4-stable/bin/gawk"
> Benchmark 1: make test t=stdio-common/tst-printf-format-vas-double-f AWK=/tmp/gawk-5.4.0/bin/gawk
>   Time (mean ± σ):      3.303 s ±  0.013 s    [User: 3.567 s, System: 0.116 s]
>   Range (min … max):    3.281 s …  3.320 s    10 runs
>
> Benchmark 2: make test t=stdio-common/tst-printf-format-vas-double-f AWK=/tmp/gawk-5.4-stable/bin/gawk
>   Time (mean ± σ):      2.369 s ±  0.018 s    [User: 2.632 s, System: 0.114 s]
>   Range (min … max):    2.352 s …  2.415 s    10 runs
>
> Summary
>   make test t=stdio-common/tst-printf-format-vas-double-f AWK=/tmp/gawk-5.4-stable/bin/gawk ran
>     1.39 ± 0.01 times faster than make test t=stdio-common/tst-printf-format-vas-double-f AWK=/tmp/gawk-5.4.0/bin/gawk
> ```
>
> Hopefully Florian can confirm as well. I didn't compare the full
> testsuite time, just picked a sample of the tst-printf-format-* tests
> (as for some reason I couldn't easily re-run just all of those with
> `subdirs=`).
>
> >
> > Thanks,
> >
> > Arnold
>
> cheers,
> sam
>
> >
> > Sam James <[email protected]> wrote:
> >
> >> Sam James <[email protected]> writes:
> >>
> >> > Florian Weimer <[email protected]> writes:
> >> >
> >> >> It looks like we have a very substantial test time regression in glibc
> >> >> after a gawk update.  Based on quick poking with GDB, it may be related
> >> >> to the MinRX change in gawk 5.4.0.
> >> >>
> >> >> This is the script:
> >> >>
> >> >>   <https://sourceware.org/cgit/glibc/tree/stdio-common/tst-printf-format.awk>
> >> >>
> >> >> Is this expected?  The input files can be quite large, with very long
> >> >> lines, too.
> >> >>
> >> >> I suppose we can switch back to the old matcher (will that remain
> >> >> available?), or maybe run it under the C locale.
> >> >
> >> > Maciej, can you take a look? I suspect you're best placed to try reduce
> >> > something here as you're the author of the tests.
> >>
> >> Resending.
> >>
> >> >
> >> >>
> >> >> Thanks,
> >> >> Florian



-- 
H.J.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.