1

Why is bash's printf faster than /usr/bin/printf?

view story
linux-howto

http://unix.stackexchange.com – I have two ways of calling printf on my system: $ type -a printf printf is a shell builtin printf is /usr/bin/printf $ file /usr/bin/printf /usr/bin/printf: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=d663d220e5c2a2fc57462668d84d2f72d0563c33, stripped So, one is a bash built in command and the other is a proper compiled executable. I would have expected a program whose only job is pritnf to be much faster than the shell function. Granted, the builtin is already loaded into memory but the actual execution ti (HowTos)