[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, 20 Apr 2020 16:23:55 -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 11:16 AM, George Jones wrote:
> No problem.   Glad you fixed it.   It's been a LONG time since I've
> actually written C, so probably best if someone current did it.
> On the parameters, I suggest you consider exposing the at user level as a
> switch or env var.   My use case was pathologically large (and would have
> been better on, e.g. Spark if that were and option in the environment).
>  Even the old behavior was probably good enough for most people.  It's only
> when you start abusing bash to to "big data" that the problem shows up.

I've been considering how to provide a way to let users indicate the size
of an array when they declare it. `declare' accepts `declare -a name[size]'
and `declare -A name[size]' for compatibility with ksh, but has never done
anything with `size'.

I could see allowing a number, or maybe an arithmetic expression, for SIZE
to set the initial size of an associative array. Or maybe an additional
option to `declare' would work better. I don't like using a shell variable
for this.

What does the group think?

``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]