[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: libtool 2.4 args parsing incredibly slow
From: |
Chet Ramey |
Subject: |
Re: libtool 2.4 args parsing incredibly slow |
Date: |
Mon, 31 Jan 2011 10:37:32 -0500 |
User-agent: |
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7 |
On 1/30/11 3:50 AM, Ralf Wildenhues wrote:
> Hello,
>
> * Dan McGee wrote on Sun, Jan 30, 2011 at 01:04:17AM CET:
>> On Sat, Jan 29, 2011 at 5:58 PM, Chet Ramey <chet.ramey@case.edu> wrote:
>>> On 1/25/11 10:08 PM, Peter O'Gorman wrote:
>>>> for lt_wr_arg
>>>> do
>>>> case \$lt_wr_arg in
>>>> --lt-*) ;;
>>>> *) set x "$@" "$lt_wr_arg"; shift;;
>>>> esac
>>>> shift
>>>> done
>
>>> This is a terribly inefficient function.
>
> Only if bash implements it inefficiently. It doesn't have to scale
> nonlinearly with an efficient shell implementation that special-cases
> this idiom which is, by the way, used quite a bit in Posix shell
> scripts.
If it's as common as you claim, it might be worth special-casing. The
question is whether that's the case, and whether it's invoked with
thousands of arguments enough to make the extra bookkeeping worthwhile.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/