We don't bite newbies here... much | |
PerlMonks |
Re^5: Could we save the memory occupied by "undef" in an array?by perrin (Chancellor) |
on Nov 24, 2008 at 01:13 UTC ( [id://725492]=note: print w/replies, xml ) | Need Help?? |
There are many ways to implement an array in C. You don't have to allocate pointers immediately for every bucket. It's irrelevant though, since Perl's implementation clearly does something that causes empty buckets to take up space.
40000 bytes is close enough to the 0.35 MB I saw that inaccuracies in measurement (I glanced at Apple's system monitor to check it) cover it. Looks like 5.10 has the same cost as 5.8.8.
In Section
Seekers of Perl Wisdom
|
|