Perl-Sensitive Sunglasses | |
PerlMonks |
Re: Efficient matching with accompanying databy BrowserUk (Patriarch) |
on Jul 11, 2013 at 02:32 UTC ( [id://1043613]=note: print w/replies, xml ) | Need Help?? |
Is Perl's internal hash implementation likely to offer sufficiently efficient alternatives? Ostensibly all you need is:
A hash will out perform the regex engine trie hands down in terms of speed. A quick test shows that running the 216,000 words in an html version of The Origin of Species against my 179,000 word dictionary using a hash takes 0.17 seconds. However, using the regex engines built-in trie (to hold the 179,000 word dictionary), is processing ~10 lines per second which means it should be finished after ~38 minutes (Update:it took 34.5 minutes):
With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
In Section
Seekers of Perl Wisdom
|
|