Bart Smaalders wrote: > William James wrote: [snip] > > Remember what Bruno Jargot wrote about performance and POSIX: > > |ksh93 is superior in functionality, performance and usability > > |compared to bash. > > | > > |A few numbers: > > |$ time bash -c 'i=0 ; s="" ; while [ $i -lt 10000 ] ; do i=$((i+1)) ; > > |s="$(echo ${s}x)" ; done' > > | > > |real 1m40.230s > > |user 1m10.660s > > |sys 0m7.548s > > | > > |$ time ksh93 -c 'i=0 ; s="" ; while [ $i -lt 10000 ] ; do i=$((i+1)) ; > > |s="$(echo ${s}x)" ; done' > > | > > |real 0m11.947s > > |user 0m8.641s > > |sys 0m1.540s > > | > > |ksh93 is much faster (10x) and has many features like arrays which > > |take strings as index, structures, floating point math, fully > > |implements and conforms the POSIX sh standard > > Except that for very small programs, ksh93 is much slower than > the Bourne shell - about a factor of 4.2, according to libmicro > tests of system("A=$$");
1. The issue with startup time is known but at least 50% is unavoidable since ksh93 does some mandatory i18n/l10n setup which the Bourne shell doesn't do (which results in some issues with multibyte character handling). If you would start fixing the multibyte handling bugs in the Bourne shell then you'll quickly end-up with the same startup penalty as in ksh93. 2. Did you measure /usr/bin/ksh93 or /usr/bin/i86/ksh93 ? /usr/bin/ksh93 is a hardlink to /usr/lib/isaexec (since we ship a 64bit version of ksh93) which contributes at least a (heavy-wheight) |exec()| call (David Comay avoided this in his patch for Indiana via linking /sbin/sh to /usr/bin/i86/ksh93 directly) 3. Which locale did you use (e.g. what is the output of $ env | egrep "LC_|LANG" #) ? 4. Could you please list the command sequence to measure the startup time of both Bourne shell and ksh93 ? ---- Bye, Roland P.S.: Setting Reply-To: to [EMAIL PROTECTED] and perf-discuss@opensolaris.org -- __ . . __ (o.\ \/ /.o) [EMAIL PROTECTED] \__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer /O /==\ O\ TEL +49 641 7950090 (;O/ \/ \O;) _______________________________________________ perf-discuss mailing list perf-discuss@opensolaris.org