List,
I've been using keys() as an lvalue to preallocate memory for hashes, and am suddenly questioning my own wisdom. From somewhere I got the notion that a statement like
keys(%hash) = 98;
will set the size of %hash not to 98 but to 128. The reason being that "when used in this manner, keys() rounds up to the next higher power of two (1, 2, 4, 8...)," and 2**7 would be the next higher power of two for 98. Lately I'm questioning this, as it would lead to some ridiculously large round-ups, quite quickly. To compound things, I can no longer find the reference from which I got this notion.
Can anyone set me straight? Do I have the right of this, or was I dreaming?
Thanks!
Deane
_______________________________________________ ActivePerl mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
