On 9/26/16, 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 an inde
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
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
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
On 9/24/16 8:29 AM, Christian Franke wrote:
> - Method-2 could be significantly speed up if the order of the array
> accesses is reversed:
>
> for (( i=0; i if (( -(Pi[i] - Pi[i+1]) < min )); then
> min=$((-(Pi[i]-Pi[i+1])))
> fi
> done
>
> Result: ~3 seconds
> (using '
On 9/23/16 7:15 PM, Tom McCurdy wrote:
> Bash Version: 4.3
> Patch Level: 11
> Release Status: release
>
> Description:
> Two nearly identical "For Loop" setups have large deltas in
> performance. See test program below. Was confirmed in IRC chat room by
> multiple users. Input is very no
Tom McCurdy wrote:
Bash Version: 4.3
Patch Level: 11
Release Status: release
Description:
Two nearly identical "For Loop" setups have large deltas in
performance. See test program below. Was confirmed in IRC chat room by
multiple users. Input is very noticeable with around 100,000 valu