David Landgren wrote:

[...]

% perl5.9.4 racmp host.1k
assembled 4145 patterns in 3.83324813842773 seconds
R::A: good = 971, bad = 29 in 0.0148990154266357 seconds
list: good = 971, bad = 29 in 5.72843599319458 seconds
 A_C: good = 971, bad = 29 in 8.56000709533691 seconds
RA  len: 87491
A_C len: 174644

That is, the assembled approach runs in under 1/500th of the time of looping through the list of REs. A_C is even worse, but given that the pattern is over twice as long, and chock full of metacharacters I suppose this shouldn't come as a surprise but it does seem odd. I'll check back with Yves and see if my methodology is sane there.

I was doing something silly with the A-C test that killed the optimiser. Fixing that up made the blead time descend from 8.56 seconds down to 0.43. In a nutshell, I was doing /^ab|^cd|^ef/ instead of /^(?:ab|cd|ef)/.

David
--
hope still, a little resistance always maybe stubborn tiny lights vs. clustering darkness forever ok?

Reply via email to