The stupid question is the question not asked | |
PerlMonks |
Re^3: Obtaining combinations of hash keys and valuesby Cristoforo (Curate) |
on Apr 29, 2016 at 18:40 UTC ( [id://1161901]=note: print w/replies, xml ) | Need Help?? |
For thousands of fragments, your result set could get large. Since you are obtaining 4 results for each combination, the total number of results would come to 4 * the total number of combinations.
I guess you need to know how you want to use/analyze the results. Also if you would want to print the results to a file or store in an array or hash. Update: When I ran a test here against a sample fasta file, I generated 124 fragments and stored the combinations in a hash. I had a total memory use of 12,848,152 bytes for the 30,504 combinations (about 421 bytes per combination). So I'd guess that if you had 1000 or more fragments, you would probably exceed your memory. When I used an array instead of a hash, the memory used was slightly less, 10,888,016 bytes. (roughly 357 bytes per combination).
In Section
Seekers of Perl Wisdom
|
|