Benji Smith:
> It's a very simple transformation, increases speed (dramatically) for 
> complex regular expressions (especially those produced dynamically at 
> runtime by combining large sets of unrelated target expressions), and it 
> reliably produces equivalent results with the inefficient version.

See:
http://search.cpan.org/~dankogai/Regexp-Optimizer-0.15/lib/Regexp/List.pm
http://search.cpan.org/~dankogai/Regexp-Optimizer-0.15/lib/Regexp/Optimizer.pm

Something like that can be implemented as small pre-processing layer over the 
re module.

Bye,
bearophile

Reply via email to