[erlang-questions] Regular expression library (was Not an Erlang fan)

Robert Virding rvirding@REDACTED
Fri Sep 28 00:29:31 CEST 2007

On 27/09/2007, G Bulmer <gbulmer@REDACTED> wrote:

> I guess it's the 'pathological' cases that worry me; "MY software
> NEVER breaks on the easy cases" :-)
> Seriously though, having a regexp with stable behaviour wins over one
> that gets the last 200% of performance *most of the time*, but is
> unstable.

I did some tests using Russ Cox example comparing the old regexp module (not
a good comparison i know) and a new version I am working on. The results
confirmed his findings.

 N              15        18         20         22          25
30          40
regexp        40      360      1570      6900     59000
re              0.2      0.25      0.32      0.38        0.5        0.73

All times in millisecs. The old regexp uses a backtracking algorithm.

Which tends to show that we will have no problems with pathological cases.
:-) If people feel that it is too slow for the simpler regexps and would
prefer to use a C library then it is definitely important to choose the
*right* library.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20070928/4810a9dd/attachment.htm>

More information about the erlang-questions mailing list