Announcing regex-tre-0.66 and benchmarks

Simon Marlow simonmar at microsoft.com
Wed Aug 9 11:48:56 EDT 2006


On 09 August 2006 15:14, Chris Kuklewicz wrote:

> For 10^5 characters on String:
> PCRE       0.077s
> DFA        0.131s
> TRE        0.206s
> PosixRE    0.445s
> Parsec     0.825s
> Old Posix 43.760s  (Text.Regex using splitRegex)
> 
> Old Text.Regex took 43.76 seconds on 10^5 characters to do a task
> comparable to the one the others did (it ran splitRegex).  The new
> PosixRE wrapping took 0.445 seconds instead.  Yes it is two orders of
> magnitude faster, and this is because my wrapping only marshals the
> String to CString once.  Laziness cannot be worth 2 orders of
> magnitude of runtime.  This is why we needed a new wrapping, which has
> grown into the new library.

Right, I see the problem with Text.Regex.splitRegex, it repeatedly packs
the String into a CString.  But then why this result:

> BenchPCRE (102363,["bcdcd","cdc"],["bbccd","bcc"])
> total is 1.294s
.. etc. ... 
> BenchPosixRE (102363,["bcdcd","cdc"],["bbccd","bcc"])
> total is 91.435s

Was this the old Posix, or your new one?  If the new one, why is it so
slow compared to the others?

Cheers,
	Simon


More information about the Libraries mailing list