On 28.11.25 15:16, Álvaro Herrera wrote:
> On 2025-Nov-28, Peter Eisentraut wrote:
>
>> But this doesn't seem to buy very much. The overhead of the shell script to
>> write out the test files appears to become significant compared the the
>> actual compile commands.
>
> If you wanted to save some shell execution time, you could move the `tr`
> calls to the bottom of the loop to avoid doing it for files that the
> `if` block is going to discard. But is that significant? I doubt it.
This actually made a measurable difference, so I included that change in
the committed patch.
> (I didn't quite understand why you use printf instead of echo, given
> that both are shell builtins in any case.)
printf is nowadays preferable over echo in portable shell scripts. See
for example
https://cgit.git.savannah.gnu.org/cgit/autoconf.git/tree/NEWS#n435
and
https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.72/html_node/Limitations-of-Builtins.html