[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: mksh import
On 6 Jan 2011, at 11:22 , Alex Goncharov wrote:
> Here are my results with your slightly modified (see at the bottom) script:
If you have accounting turned on on your system the reason
ksh93 does so well with that script becomes clear: The other
shells all fork a bunch of subshells, I'm guessing to execute each
instance the recursively-called function, while ksh93 manages to
complete the whole thing in a single process (that's why the
system time is close to zero).
That's a pretty good trick, but I'm not quite sure the numbers
from that can be translated into an expectation for real world
performance. Most shell scripts I read spend most of their time
running other programs, and if you do that here (say, change echo
to /bin/echo) I've got a feeling the difference between that and
/bin/sh will look considerably smaller.
That's not to say ksh93 isn't interesting, but I don't think the
fact that it runs that script two or three times faster than
everything else says too much about anything beyond that script.
Main Index |
Thread Index |