Stuart Johnston wrote:
Bowie Bailey wrote:
[EMAIL PROTECTED] wrote:
While I doubt it'd have quite the performance gains that A-C can
offer, Regexp::Assemble certainly sounds like something worth
trying... the coderef trick, in particular, is very nifty.
It can work well. After reading about it here, I tried it on one of
my programs that compares about 1600 words and phrases against a
document. My scan time dropped by 30%. This doesn't count the time
taken to assemble the regex (about .27 seconds), but since this
program runs as a daemon and only has to do the assembly once, it
wasn't relevant to me.
Wouldn't assembling all rules into one regex make it impossible to have
per rule scores?
No. Using tracked mode, you recover the original pattern, use that as a
key into a hash that gives you the name of the rule, and then update a
scoring hash keyed on the rule name.
After the body scan, you look at what keys have been set in your scoring
hash and you have your base set of rules that have been triggered. You
would then coalesce them as usual according to the various meta rules.
David.
--
Much of the propaganda that passes for news in our own society is given
to immobilising and pacifying people and diverting them from the idea
that they can confront power. -- John Pilger
- Re: body speedups using new features in perl 5.9.x David Landgren
-