Path: csiph.com!fu-berlin.de!usenet.stanford.edu!not-for-mail From: Mike Jonkmans Newsgroups: gnu.bash.bug Subject: Re: program gets faster when it outputs more on stderr Date: Thu, 7 Jun 2018 09:24:40 +0200 Lines: 39 Approved: bug-bash@gnu.org Message-ID: References: <20180310144641.62962CC028D@sint.jonkmans.nl> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: usenet.stanford.edu 1528356311 9017 208.118.235.17 (7 Jun 2018 07:25:11 GMT) X-Complaints-To: action@cs.stanford.edu Cc: bash@packages.debian.org To: bug-bash@gnu.org Envelope-to: bug-bash@gnu.org Content-Disposition: inline In-Reply-To: X-SourceIP: 62.163.69.112 X-Ziggo-spambar: / X-Ziggo-spamscore: 0.0 X-Ziggo-spamreport: CMAE Analysis: v=2.3 cv=edoTgYMH c=1 sm=1 tr=0 a=ONQKbMlQgRqYTzjcV855Rg==:17 a=kj9zAlcOel0A:10 a=7mUfYlMuFuIA:10 a=z1JpXXSw26H9vN9PBLEA:9 a=L03L2QfmqWoA:10 a=CjuIK1q_8ugA:10 none X-Ziggo-Spam-Status: No X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 212.54.42.164 X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com gnu.bash.bug:14222 On Sat, Mar 10, 2018 at 04:50:22PM -0500, Chet Ramey wrote: > On 3/10/18 9:46 AM, bashbug@jonkmans.nl 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. > When i run the script with realtime prio (as root) via : chrt -r 99