bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: parameter expansion is too slow


From: Chet Ramey
Subject: Re: parameter expansion is too slow
Date: Tue, 7 Sep 2004 15:09:04 -0400

> Machine Type: i686-pc-linux-gnu
> 
> Bash Version: 3.0
> Patch Level: 0
> Release Status: release
> 
> Description:
>     Parameter expansion ${xy[*]} is awefully slow.
> 
> Repeat-By:
>     seq 100000 > /dev/null            --> 0.3s
> 
>     echo `seq 100000` > /dev/null     --> 1s
> 
>     xy=( `seq 100000` )                       --> 1s
>     echo ${xy[*]} > /dev/null         --> 550s (9m 10s)
> 
>     What is causing this?  Accessing 'xy' array directly, and printing the
>     elements out to <stdout> takes negligible time.

Really pathological N! behavior.  I fixed it.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet )
                                                Live...Laugh...Love
Chet Ramey, ITS, CWRU    chet@po.cwru.edu    http://tiswww.tis.cwru.edu/~chet/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]