[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
quadratic behavior for variable append
From: |
Ralf Wildenhues |
Subject: |
quadratic behavior for variable append |
Date: |
Thu, 12 May 2005 13:53:16 +0200 |
User-agent: |
Mutt/1.4.1i |
GNU Libtool suffers[1] from the fact that repeated concatenation
var=
for elem in $long_list
do
var="$var $elem"
done
scales quadratically in the number of list elements. Now while most if
not all common shells exhibit this behavior, and it happens even when
you append a constant string, I do think it is a bug, and should be
fixed. Last tested with
| GNU bash, version 3.00.14(1)-release (x86_64-redhat-linux-gnu)
Please keep me in Cc:, I'm not subscribed.
Regards,
Ralf
[1] http://lists.gnu.org/archive/html/libtool-patches/2005-05/msg00050.html
and proposed workaround with temp files (3rd attachment):
http://lists.gnu.org/archive/html/libtool-patches/2005-05/msg00076.html
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- quadratic behavior for variable append,
Ralf Wildenhues <=