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

G Bulmer gbulmer@REDACTED
Mon Oct 1 23:19:08 CEST 2007


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