Patrick R. Wade wrote:

> When i want to match on multiple addresses with the TO_ macro, is it 
> more efficient to match on One Big Regex:
> or to match on Several Smaller Regexes:

You can only determine the right answer by testing.

    $ time procmail sample-procmailrc-one-big < sample-mail-corpus
    $ time procmail sample-procmailrc-many-little < sample-mail-corpus

But my guess is that there's no measurable difference for less than
~1,000 addresses, and a 1,000 term regex will probably explode your
regex parser.

Why no difference?  Opening a mailbox, writing a message, and closing
it takes at least one disk seek, or around ten milliseconds.
Compiling and evaluating a regex is a thoroughly studied and solved
computer science problem, and the code that does it probably takes
less than ten microseconds, or 1/1000th as long.  Therefore you can
compile and execute 1,000 regexes in much less time than one disk
seek.

But like I said, I'm just guessing.  Measure and know.

-- 
Bob Miller                              K<bob>
                                        [EMAIL PROTECTED]
_______________________________________________
EUGLUG mailing list
[email protected]
http://www.euglug.org/mailman/listinfo/euglug

Reply via email to