Bruce Dawson wrote:
> The reply below is way too long, but oh well.
>
> The summary is:
> I am 100% certain that my ExprCount() loop is CPU bound.
Your stats claim 530 iterations/second when spawning expr.
That's ~2ms/process create.
In an article from 14 years ago on a 200Mhz Pen
Note that the ~2ms/process create is when the power management fails to get
invoked. It drops to ~0.6ms/process create when the CPU ramps up to full
speed. The chart you list from twelve years ago shows 6.0 ms to spawn a new
process, so my machine is about ten times faster -- seems about right.
Clo
I looked at the CPU sampling data to try to confirm what is going on. The
profile data (captured by zoom, using perf) shows ~90% of the samples
hitting in various invocations of expr. The tool won't summarize call stacks
across processes so I manually looked at a bunch of them. I looked at
samples
1) Why not use your 'null' program, which in your blog, you state makes little
difference.
2) Better, why not use the simple 'fork'/exit' which doesn't call a separate
program; (that's
one reason for switching to perl or better, would be C;
Note the perl prog:
#!/usr/bin/perl
die "need count" u
Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash=' -DCONF_HOSTTYPE='x86_64'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-unknown-linux-gnu'
-DCONF_VENDOR='unknown' -DLOCALEDIR='/home/dualbus/
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 3/20/13 5:56 PM, Eduardo A. Bustamante López wrote:
> Bash Version: 4.3
> Patch Level: 0
> Release Status: alpha
>
> Description:
> The rules for escaping single quotes inside the
> pat and rep arguments are somehow fuzzy. There's a difference
On Wed, Mar 20, 2013 at 09:15:24PM -0400, Chet Ramey wrote:
> http://lists.gnu.org/archive/html/bug-bash/2012-02/msg00106.html
Ah, I rembember that thread, but somehow just read the beginning of
it. Until now I realize it developed a lot further.
> You say that, but you don't provide any actual e
Hey, fascinating stuff here. I'm learning a lot of useful new tools and
techniques. I like your perl scripts.
I tend to avoid perl because I don't know it well and I'm not a fan.
Personal preference. Good point about using my 'nop' program. It might
simplify testing slightly, but shouldn't change