[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: using mapfile is extreamly slow compared to oldfashinod ways to read
From: |
Chet Ramey |
Subject: |
Re: using mapfile is extreamly slow compared to oldfashinod ways to read files |
Date: |
Mon, 06 Apr 2009 16:31:00 -0400 |
User-agent: |
Thunderbird 2.0.0.21 (Macintosh/20090302) |
Matthew Woehlke wrote:
> Chet Ramey wrote:
>> I'm sure there are efficiency improvements possible in the bash indexed
>> array implementation, but sequentially accessing a data structure
>> optimized for space and sparse arrays is never going to be as fast as
>> a read-process loop, and that difference becomes more and more apparent
>> the larger the array.
>
> Maybe bash should remember the last position to optimize accessing the
> next element?
I already took a couple of hours and implemented something like this. It
will be in the next version. Sequential access performance is
dramatically improved.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/