[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: program gets faster when it outputs more on stderr

From: Chet Ramey
Subject: Re: program gets faster when it outputs more on stderr
Date: Sat, 10 Mar 2018 16:50:22 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

On 3/10/18 9:46 AM, address@hidden 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    address@hidden    http://tiswww.cwru.edu/~chet/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]