flexvault has asked for the wisdom of the Perl Monks concerning the following question:
When I create a %hash, I always presize it with:
my %hash = (); keys(%hash) = $nnn;Question is, what is the minimum or default number of keys that are allocated by perl? Currently, I usually assign $nnn when I think the hash will grow to more than 30, but if the minimum was higher, I could save some key-strokes and use less instructions.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Minimum Hash keys allocated?
by BrowserUk (Patriarch) on Sep 26, 2010 at 18:25 UTC | |
by flexvault (Monsignor) on Sep 26, 2010 at 21:32 UTC | |
by BrowserUk (Patriarch) on Sep 26, 2010 at 21:41 UTC | |
|
Re: Minimum Hash keys allocated?
by afoken (Chancellor) on Sep 26, 2010 at 18:20 UTC | |
by halfcountplus (Hermit) on Sep 26, 2010 at 18:50 UTC | |
|
Re: Minimum Hash keys allocated?
by cdarke (Prior) on Sep 27, 2010 at 10:10 UTC | |
by flexvault (Monsignor) on Sep 27, 2010 at 11:01 UTC |