in reply to Re^4: Matching against list of patterns
in thread Matching against list of patterns
Hmm, well, I still don't understand how unwinding array of regexpes can give 10fold improvement.
I re-run your code against a bit different body of data (20 regexp, 5k lines), and results are a bit different:
Array of regexpes unwinded, with /o: 28.97s user 0.09s system 79% cpu 36.674 total Array of regexpes unwinded, without /o: 29.95s user 0.04s system 95% cpu 31.481 total foreach loop, without /o: 2.61s user 0.00s system 100% cpu 2.595 total foreach loop, with /o: 0.33s user 0.01s system 17% cpu 1.957 total
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^6: Matching against list of patterns
by Random_Walk (Prior) on Sep 17, 2004 at 12:00 UTC |
In Section
Seekers of Perl Wisdom