"make check" times
Paul Eggert
eggert@cs.ucla.edu
Mon Oct 5 22:41:36 GMT 2020
On 10/5/20 2:51 PM, DJ Delorie via Libc-alpha wrote:
> Is printf a guaranteed builtin in posix shells?
It's not a "Special Built-In Utility" in the POSIX sense, but neither are 'echo'
or 'read'.
To answer what I think is your real question, these days I believe that "printf
'%s\n' 'FOO'" is typically nearly as fast as "echo 'FOO'" on the shells that
glibc developers use. I just tried a simple benchmark with bash and dash on
Ubuntu 20.04 x86-64 with a loop that just output 'x' on a line, and the echo
version was about 20% faster with dash and about 15% faster with Bash.
More information about the Libc-alpha
mailing list