perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aaron Trevena" <>
Subject Re: Memory usage
Date Thu, 13 Sep 2007 13:50:21 GMT
Hi Will,

How many keys will your hashes contain?

The main memory wastage with hashes isn't due to the size of what you
keep in them but the number of keys.

If you are using integers as keys, why not just use an array?

Bare in mind that the 'hashspace' is shared between your hashes, so if
you have a lot of  hashes with only a relatively small number of
entries (i.e. hundreds rather than thousands) you might want to look
at using Binary::Tree::Dictionary - something I wrote when I needed a
lot of low memory hash/dictionarys for relatively small data sets in a
perl daemon.


LAMP System Integration, Development and Hosting

View raw message