Re: Magnitude of Order "For Loop" performance deltas based on syntax change

2016-09-26 Thread Dan Douglas
On Mon, Sep 26, 2016 at 3:32 PM, Chet Ramey wrote: > So you want offset N to be the nth element in the array instead of the > element with index N? Huh. Maybe, not always. Both would be nice. The offset isn't the element with the index N. It's the next set element whose index is >= that of the se

Re: Magnitude of Order "For Loop" performance deltas based on syntax change

2016-09-26 Thread Chet Ramey
On 9/26/16 11:47 AM, Dan Douglas wrote: > Would an array of pointers to structs of key-value pairs be better > here? It should be faster in the common cases even though it may mean > some wasted space and reallocs depending on how you decide to grow the > array. A linear search through an array for

Re: Magnitude of Order "For Loop" performance deltas based on syntax change

2016-09-26 Thread Dan Douglas
Would an array of pointers to structs of key-value pairs be better here? It should be faster in the common cases even though it may mean some wasted space and reallocs depending on how you decide to grow the array. A linear search through an array for an index should be faster than linked-list trav

Re: bash history with mixed timestamps slow and broken

2016-09-26 Thread Eric Blake
On 09/25/2016 05:39 PM, Chet Ramey wrote: >> Description: >> If the history file (`.bash_history`) starts with a timestamp >> (`HIST_TIMESTAMP_START`), and contains lines that have been written >> without timestamps, then reading the history file is (a) very slow >> because (b)