Boost logo

Boost :

Subject: Re: [boost] [regex, xpressive] interesting(?) perf benchmark
From: Eric Niebler (eric_at_[hidden])
Date: 2010-06-07 12:00:25


On 6/7/2010 11:17 AM, John Maddock wrote:
>> http://shootout.alioth.debian.org/u32/benchmark.php?test=regexdna&lang=all
>>
>> Here we see every language compared on how well it can perform on a
>> particular regex task.
<snip>
>> What really bugs me is that we're skunked by a C
>> library: Tcl. Grrrr. I've read a bit about Tcl's regex library; it does
>> what Mathias is suggesting: implements both a DFA and an NFA, analyzes
>> the pattern and chooses which to use. I've known for a while that this
>> is the way forward, but I just don't have the time for that. (Wasn't
>> there a GSoC project to do that for Boost.Regex?)
>
> My memory fails me.... In any case the regex GSOC project never got off
> the ground.

Bummer.

> Nosing around the entries to the competition, I wonder how much of the
> performance difference is down to the regex engine, and how much to
> other tricks the entries use: for example I notice the top C program
> uses a thread pool to conduct everything in parallel. Cheating I say! ;-)

The entry that uses xpressive does something similar. By hook or by
crook, I say! But the competition also lets you compare the solutions by
lines of code and by memory usage. On both counts, the solution that
uses Tcl fares very badly, but that won't matter to most people, I'll wager.

-- 
Eric Niebler
BoostPro Computing
http://www.boostpro.com

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