Re: help wanted reproducing reported performance regression in groff 1.24

Morten Bo Johansen <[email protected]> Tue, 17 Mar 2026 13:56:53 +0100
Newsgroups gmane.comp.printing.groff.general
Message-ID <[email protected]>
Hi Branden,

On 2026-03-17 G. Branden Robinson wrote:

> What libc and libstdc++/libc++ does your system use?

glibc 2.43+r5+g856c426a7534-1
libstdc++ 15.2.1+r604+g0b99615a8aef-1
libc++ 22.1.1-1

> Can you re-run your test scenario with the `-Z` option added to groff's
> command line?  I'm curious to know how cutting grotty out of the
> execution pipeline affects the numbers.

I used this script:

  for ((n=1; n<=64; n*=2)); do
  
      for v in 23 24; do
        for ((i=1; i<=$n; i++)); do
          cat bash.1
        done | troff -M groff-1.$v.0/tmac/ -man -Tutf8 > bash_troff-1.$v.0.ditroff
      done
  
      for v in 23 24; do
        declare "dur$v"="$(/usr/bin/time -f "%U" grotty < bash_troff-1.$v.0.ditroff 2>&1 > /dev/null)"
      done
  
      printf "% 3s\t% 4s\t% 4s\n" $n $dur23 $dur24
  done

Could you modify the script for me to make it do what you want?

Thanks,
Morten