Re: Perl hashing speedup ?



On Mon, Sep 04, 2006 at 06:20:21AM -0700, sujit wrote:
This is regarding perl hashing. I am creating a 3 level hash (actually
2 such hashes at a time) with approx. 2.6 million entries.

In case you need any additional information about memory usage,
Memory used by process - 26 MB (Approx)
Virtual memory usage - 720 MB (Approx)
RAM available on machine - 512 MB

Under the suspicion that the cause for slowdown is that you have reached
your memory limit, I'd suggest trying a smaller hash:

http://search.cpan.org/dist/Tie-GHash/

Note that according to the documentation, the actual access is *slower*
than a Perl native hash, but if it prevents you from hitting the disk,
it may be worth it many times over.


--
Gaal Yahas <gaal@xxxxxxxxxx>
http://gaal.livejournal.com/
.


Loading