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.ra...@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    c...@case.edu    http://cnswww.cns.cwru.edu/~chet/

Reply via email to