Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Re: Memory issue with large cancer gene data structure

by RichardK (Parson)
on Jul 25, 2013 at 15:07 UTC ( #1046365=note: print w/replies, xml ) Need Help??

in reply to Memory issue with large cancer gene data structure

Do you really need to keep a list of $key4 ? I think you could just count them, $key4 as both a key and a value looks at bit odd, and you only seem to be counting them by keeping an array of repeated values. So, you could get rid of the useless arrays and replace them with a simple integer.

#so replace this push (@{$site{$key1}{$key4}},$key4); #with $site{$key1}{$key4}++;

BTW In the code you posted as the problem area the sorts are doing nothing useful, just taking up time, but maybe you're doing other stuff in there too.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1046365]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (8)
As of 2018-06-25 20:27 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (128 votes). Check out past polls.