On 3/10/18 9:46 AM, [email protected] wrote:
> Bash Version: 4.4
> Patch Level: 12
> Release Status: release
>
> Description:
> When a function is ran in a subshell environment (via backticks),
> the program runs faster when that function also writes to stderr.
I don't get these results. I ran it a few times out of curiosity, and the
`fast' version ran 2-3 times slower than the `slow' one. Even running it
against a profiling version doesn't show any significant difference in
function calls.
Your results could be due to many factors: stdio buffering, a scheduler
that biases perceived interactive processes, I/O optimizations. Nothing
to do with bash, though.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU [email protected] http://tiswww.cwru.edu/~chet/