[Top][All Lists]

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

parameter expansion is too slow

From: William Park
Subject: parameter expansion is too slow
Date: Sat, 4 Sep 2004 23:59:07 -0400

Configuration Information [Automatically generated, do not change]:
Machine: i686
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' 
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu' 
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/local/share/locale' -DPACKAGE='bash' 
-DSHELL -DHAVE_CONFIG_H  -I.  -I. -I./include -I./lib   -O4 -march=i686
uname output: Linux node1 2.6.7 #6 SMP Sun Aug 22 23:49:58 EDT 2004 i686 
unknown unknown GNU/Linux
Machine Type: i686-pc-linux-gnu

Bash Version: 3.0
Patch Level: 0
Release Status: release

    Parameter expansion ${xy[*]} is awefully slow.

    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.

reply via email to

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