Boost logo

Boost :

From: Eric Niebler (neric_at_[hidden])
Date: 2002-10-27 21:37:47


On Thu, 24 Oct 2002 23:58:55 +0000, Srivatsan Raghavan wrote:

> Paul Selormey wrote:
>>Any independent verifications that Greta is 7 times faster than
>>Regexp++?
>>
> Dr. John Maddox (the author of Regex++) did some time trials on the
> various regex implementations available and it appears that claims that
> "Greta is 7 times faster than Regex++" are exaggerated however, in many
> cases greta does currently beat Boost::regex

In my own defense, I'd like to point out that this whole "GRETA is 7x
faster than boost::regex" has been taken quite out of context. If you
look in the archives, what I actually said was that GRETA is _as much as_
7x faster than boost. This is not an exageration -- John's own tests bear
this out -- but neither is it a particularly useful observation. As
John's extensive tests indicate, it all depends on what you're doing.

In truth, I had only run tests on short-ish strings at the time. In fact,
I tooks the test cases directly out of the boost::regex documentation. It
didn't even occur to me to try testing against strings 10's or 100's of
thousands of characters long. Why? Because in my experience, this is not
how people generally use regular expressions. Mostly, people use regexes
to validate user input, or process a file one line at a time. GRETA's
first task was in a natural language processing engine, where is was
typically used to match single words, or a single sentence at most. GRETA
excels in these scenarios.

Also, many people have complained about the license. I sympathize. I
wrote the code, not the license. If you were a lawyer for a company with
deep pockets (like MS) you'd be wary about liability, too. Some people
have chosen to use GRETA in commercial applications anyway, reasoning that
the license is simply MS's way of avoiding lawsuits. Diff'rent strokes.

It begs the question: if I knew people couldn't use the code legally in
commercial apps, why did I even bother to make it public? I struggled
with this but ultimately:

- I wanted to participate in C++0x standardization

- I wanted to get my ideas out there, so that maybe somebody would pick
up on them and use them in a free project.

I am indeed participating in standardization. And I have received plenty
of mail from people who have used GRETA's FSM implementation in their
applications. And even boost::regex is moving toward a zero-allocation
stack-based recursive algorithm. Only John knows if this has anything to
do with my making GRETA's implementation public, but I can flatter myself.
 :-) So in short, I consider GRETA a success.

Thanks,
Eric


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