[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Implement rehashing for associative arrays (Re: speeding up

From: Chet Ramey
Subject: Re: [PATCH] Implement rehashing for associative arrays (Re: speeding up hash_search?)
Date: Mon, 4 May 2020 16:12:35 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Thunderbird/68.7.0

On 4/20/20 5:12 PM, George Jones wrote:
> No real opinion on syntax.
> Using something existing:
>     declare -A foo[SIZE]
> seems sensible, especially if there was no semantic meaning (I'm not a fan
> of syntax without semantics .... clutter).

It's been there forever for ksh88 compatibility, but bash doesn't use it
for anything (and I suspect ksh93 doesn't either).

> Big thing is that the new stuff for fringe new pathologic use cases (mine)
> should not have negative impact (huge buffer preallocation) on the existing
> ?30 years? of users/scripts.

I don't think there are very many, if any, scripts out there using that
syntax. It's never had any semantic meaning.

> Some docs on how the SIZE is used (hint for preallocation of hash table
> size, not hard limit on number of entries) probably also in order.

Sure, if the size argument ever meant something, I would document it. :-)


``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    address@hidden    http://tiswww.cwru.edu/~chet/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]