in reply to Re^7: Efficient matching with accompanying data
in thread Efficient matching with accompanying data
15000 alternatives:
lanx@nc10-ubuntu:~/B/PL/PM/buk_trie$ perl buk_trie.pl chapter2.txt 481Finding 1027 words (of 5038) took 0.041860 seconds using a hash 482Finding 923 words took 0.025128 seconds using a trie(via regex engi +ne)
15500 alternatives
lanx@nc10-ubuntu:~/B/PL/PM/buk_trie$ perl buk_trie.pl chapter2.txt 481Finding 1078 words (of 5038) took 0.040339 seconds using a hash 482Finding 958 words took 10.042522 seconds using a trie(via regex eng +ine)
changing buffer-size didn't help.
This is perl, v5.10.0 built for i486-linux-gnu-thread-multi
> For most of my stuff, that limit is way to low to consider.
well as already stated by AnoMonk, you can split the set into different regexes with < 10000 alternatives.
Regexes can do things which hashes can't...
Cheers Rolf
( addicted to the Perl Programming Language)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^9: Efficient matching with accompanying data
by BrowserUk (Patriarch) on Jul 12, 2013 at 02:50 UTC |