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

G Bulmer gbulmer@REDACTED
Wed Oct 3 23:51:48 CEST 2007


> Unfortunately at the moment is a little slower on simple regular  
> expressions than the old regexp module. It seems like it is more  
> difficult to optimise for the simple cases when you concentrate on  
> the tough ones.
>
> But I'm working on it. Do the versions which use PCRE or other  
> libraries work on Windows without a C compiler?
I do not know, and I don't have a Windows machine with me.
I'm in sunny Freiburg with my trusty MacBook, across the road from  
the conference in the 'Design Hotel' Stadtgarten.

> At the moment that is all I have with no other development env than  
> Erlang. It would be interesting to compare.
>
> Robert
>
> On 01/10/2007, G Bulmer <gbulmer@REDACTED> wrote: Robert
>
> Sorry for the tardy response. I've been enjoying Erlang too  
> much ... :-)
>
> The results for your new version on pathological cases look  
> outstanding.
>
> How does this versions performance compare to the existing regexp for
> simpler matches (without back references)?
>
> G Bulmer
>
> PS - See y'all in Freiburg on Thursday & Friday
>
> > On 27/09/2007, G Bulmer 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        1.4
> >
> > 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.
> >
> > Robert
> >
>
>




More information about the erlang-questions mailing list