On Thu, Mar 18, 2010 at 04:58:39PM +0100, Jennifer Pioch wrote:
> 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:

BTW, I've been using ${var##*/} and ${var%/*} for years as a built-in
replacement for basename(1) and dirname(1).  Making those two commands
built-ins won't help me!  :)

> This ROCKS incredibly!!!! :)

I agree that more builtins -> better.

> > 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

Bash users still need the commands in the bin directories.  This case
has a note indicating that eventually even bash4 weill be able to use
ksh93 builtins, but that would still leave zsh, tcsh, ...

Nico
-- 

Reply via email to