in reply to Re: Re: Copying a hash to another hash problem
in thread Copying a hash to another hash problem
Well, this isnt intrinsically a bad thing. But more often than not it is.
The reason I say this is because if your indexes are sparse, ie 1, 500,623,7439,104029 or the like, then a hash is a much more suitable container type than an array is. (A hash would store the above usin 5 slots in a hash, an array would store at minimum 104029 elements.) However if the array is dense, 1..9,11..19,21..29 etc then an array is a more suitable approach. (Each slot in a hash is bigger than in an array, so even with the 4 wasted slots in the array would still be much smaller than the 26 allocated slots in the hash.)
Also, the difference isnt so much due to what you store in the values, but what you store in the keys.
Good luck and dont forget strict. :-)
--- demerphq
my friends call me, usually because I'm late....
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Copying a hash to another hash problem
by Anonymous Monk on Oct 23, 2002 at 07:41 UTC |