On Thu, Mar 18, 2010 at 4:41 PM, Darren J Moffat <darrenm at opensolaris.org> wrote: > Maybe I don't understand enough about ksh93 (since I'm a zsh user for > interactive shell work) but I don't understand what this case is about. > > What benefit does this case bring ?
One advantage is MUCH HIGHER performance. A simple loop iterating over my source tree with basename takes 26 seconds without a builtin and 0.1 seconds when basename is a builtin: $ timex ksh93 -c 'find work/src | while read i ; do x=$(basename $i) ; done' real 26.35 user 9.34 sys 1.34 $ timex ksh93 -c 'builtin basename ; find work/src | while read i ; do x=$(basename $i) ; done' real 0.11 user 0.07 sys 0.03 This ROCKS incredibly!!!! :) > How does this interact with PSARC/2009/377 in kernel pfexec, maybe it > doesn't need to and that is an okay answer, when ksh93 is the profile shell > ? ksh93-integration-discuss@ currently has an ongoing discussion about this and the broken profile shell concept. There are two concurrent proposals to integrate the concepts of shell builtins and profile shells. > Why would I want to use ksh93 builtins if I have /usr/gnu/bin explicitly in > my path ? The default end user path in Opensolaris contains /usr/gnu/bin at the beginning. Scripts which run from that environment will have lower performance in ksh93 except when they set their own PATH. Enabling the builtins in /usr/gnu/bin solves the problem and restores full performance again. > Are the ksh93 builtin versions 100% compatible in all respects > with the GNU ones ? I think yes. Otherwise Olga wouldn't propose them. > If so then I wonder why we are even shipping the GNU > ones. I don't see the point either since the ksh93 commands have both features from GNU AND BSD Jenny -- Jennifer Pioch, Uni Frankfurt