That's a brilliant way to do it. My own brute force method of comparing all the strings character by character required 5,000,050,000 comparisons and took almost 4 hours. Yours loops through 100,000 items once, then loops through a maximum of 2,000,000 keys once. It's not even close.
Aaron B.
My Woefully Neglected Blog, where I occasionally mention Perl.
In reply to Re^3: Comparing a large set of DNA sequences
by aaron_baugher
in thread Comparing a large set of DNA sequences
by shamshersingh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |