For a benchmark there are certainly more sophisticated test-cases
necessary!
But a performance factor of 500, as quoted below, seems strange
to me. On my Linux 2.6.32 (64bit, 4 cores) the numbers look quite
different:
real user sys
dash 0m0,84s 0m0,17s 0m0,66s
bash 0m1,38s 0m1,30s 0m0,08s
zsh 0m1,28s 0m0,53s 0m0,77s
ksh 0m0,50s 0m0,50s 0m0,00s
bash is 4.1.5
zsh is 4.3.10
ksh93 is JM 93t+
I used data of a similar magnitude and one program for all shells:
$ wc out
50977 700000 4013496 out
$ cat prog
while read -r line
do
printf "%s" "$line"
done < out > /dev/null
> Date: Fri, 7 Jan 2011 22:26:23 +0100
> From: [email protected]
> To: [email protected]
> Subject: Re: [ast-users] ksh93: Shell Benchmarks
>
>
> Le 07/01/2011 20:40, Kent W a écrit :
> >
> > The question of replacing the default shell in NetBSD "base" with
> > something else has comeup. Naturally, being the ksh93 enthusiast
> > that I am I suggested we use ksh93. I am hoping to find some
> > shell code that I could use to benchmark the various shells (ksh93,
> > mksh, zsh, ...). I am hoping to show that, on average, ks93 has
> > superior performance to these other shells. Can someone
> > point me in the right direction?
>
> easy ;^)
>
> uname -a
> CYGWIN_NT-6.0 pcvista 1.7.7(0.230/5/3) 2010-08-31 09:58 i686 Cygwin
>
> wc _2.txt
> 56024 236777 2389037 _2.txt
>
> # dash 0.5.6.1
> time dash -c 'while read line; do printf "%s" "$line"; done < _2.txt >
> /dev/null'
> real 0m15.745s user 0m1.279s sys 0m14.320s
>
> # bash 3.2.51(24)
> bash -c 'time while read -r line; do echo -E "$line"; done < _2.txt >
> /dev/null'
> real 0m19.357s user 0m4.243s sys 0m14.601s
>
> # bash 4.1.9(1)
> bash -c 'time while read -r line; do echo -E "$line"; done < _2.txt >
> /dev/null'
> real 0m18.268s user 0m4.353s sys 0m13.666s
>
> # zsh 4.3.10
> time zsh -c 'while read -r line; do echo -E "$line"; done < _2.txt >
> /dev/null'
> real 0m25.718s user 0m2.355s sys 0m23.181s
>
> # pdksh 5.2.14
> ksh -c 'time while read -r line; do print -r "$line"; done < _2.txt >
> /dev/null'
> 15.68s real 1.59s user 13.08s system
>
> # ksh 11/16/88f
> ksh88 -c 'time while read -r line; do print -r "$line"; done < _2.txt >
> /dev/null'
> real 0m0.02s user 0m0.29s sys 0m0.03s
>
> # ksh JM 93t+ 2010-03-05
> ksh93 -c 'time while read -r line; do print -r "$line"; done < _2.txt >
> /dev/null'
> real 0m0.37s user 0m0.37s sys 0m0.00s
>
> Regards,
>
> Cyrille Lefevre
> --
> mailto:[email protected]
>
>
>
> _______________________________________________
> ast-users mailing list
> [email protected]
> https://mailman.research.att.com/mailman/listinfo/ast-users
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users