Boost logo

Boost :

Subject: Re: [boost] [regex, xpressive] interesting(?) perf benchmark
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2010-06-07 05:50:48


Le 07/06/2010 04:58, Eric Niebler wrote:
> I'm always suspect of benchmarks, but I figured I'd post this anyway.
>
> http://astl.sourceforge.net/bench.7.html.
>
> It seems someone wrote a generic automata library and a regex engine on
> top of it, and compared its performance to boost.regex, xpressive, pcre,
> and greta. Of course, his library wins handily. (The purpose of
> benchmarking is to make yourself look good, right? ;-) He doesn't say
> that (a) his engine is a DFA, and he's comparing to NFAs; and (b) he's
> only implemented a tiny subset of regex features people would expect;
> e.g., no captures even, let alone backreferences: things that can be
> tricky or impossible to implement with DFAs. He also doesn't say what
> version of Boost he's using (tests run Nov. 2009) or whether he's using
> static or dynamic xpressive (probably dynamic; static can be ~15% faster).

Just an idea: for static xpressive, couldn't you detect at compile-time
that the expression is truly regular, and use a DFA in that case?


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk