Subject: Re: ksh bugs and behaviour questions
To: <>
From: David Laight <david@l8s.co.uk>
List: tech-userlevel
Date: 01/25/2003 19:23:38
> Hmm. Or for true slowness, you could use bash:
>
> $ time sh -c 'for i in $(jot 10000); do /bin/echo -n; done'
> 11.52 real 0.47 user 5.07 sys
> $ time ksh -c 'for i in $(jot 10000); do /bin/echo -n; done'
> 14.38 real 0.68 user 7.12 sys
> $ time bash -c 'for i in $(jot 10000); do /bin/echo -n; done'
> 22.95 real 1.88 user 12.71 sys
>
> I was surprised by two things:
I'm surpised there is that much difference!
Trully odd things must be going on in ksh (I don't have bash).
$ time sh -c 'for i in $(jot 10000); do /bin/echo -n; done'
17.82 real 14.24 user 2.16 sys
$ time sh -c 'for i in $(jot 10000); do echo -n; done'
0.08 real 0.07 user 0.00 sys
$ time sh -c 'for i in $(jot 10000); do /rescue/echo -n; done'
5.96 real 4.44 user 0.63 sys
$ time ksh -c 'for i in $(jot 10000); do /bin/echo -n; done'
29.57 real 20.96 user 7.05 sys
$ time ksh -c 'for i in $(jot 10000); do echo -n; done'
0.21 real 0.07 user 0.02 sys
$ time ksh -c 'for i in $(jot 10000); do /rescue/echo -n; done'
16.68 real 11.55 user 4.13 sys
Clearly all the time in the shell is spent once it knows it has to
to an exec....
David
--
David Laight: david@l8s.co.uk