On 07/07/2014 09:48 AM, Bernhard Voelker wrote:
> This is a minor performance improvement:
> 
>   $ strace -fv /bin/true --xxx 2>&1 | wc -l
>   105
> 
>   $ strace -fv src/true --xxx 2>&1 | wc -l
>   26
> 
>   $ time for i in $(seq 1000) ; do /bin/true --xxx ; done >/dev/null
> 
>   real    0m5.083s
>   user    0m0.481s
>   sys    0m4.319s
> 
>   $ time for i in $(seq 1000) ; do src/true --xxx ; done >/dev/null
> 
>   real    0m4.729s
>   user    0m0.319s
>   sys    0m4.107s
> 
> 
> Do you think it's worth doing?

Not worth it IMHO since it slightly complicates the code
for this edge case where an argument is passed.
Also the true binary is only an edge case fall back itself.

thanks,
Pádraig.


Reply via email to