Boost logo

Boost Users :

From: Jeff Garland (jeff_at_[hidden])
Date: 2007-11-22 12:28:15


John Maddock wrote:
> Jeff Garland wrote:

>> That said, it's one data point and what you're doing may have totally
>> different results. That's not to mention the effect of the compiler
>> -- gcc doesn't have a greatest reputation for optimization although
>> it's been improving. And, you're also depending on other programmers
>> to write good benchmarks.
>
> Yep, looking at the source code for the test, my first impression is that
> most of the time is likely to be taken up with the iostream code. I also

Interesting...

> notice that the C-language PCRE test takes almost exactly the same amount of
> time as the two C++ / Boost-Regex tests, in spite of avoiding high level
> constructs like std::string.

Yeah, it makes me generally suspicious about the benchmark quality when a
scripting language like perl outperforms C -- just because the internals of
perl (and most everything else for that matter) are written in C. But in the
case of regex I guess I can believe that the perl folks may have written a
highly optimized regex implementation (in C of course) that makes things run fast.

> Might be tempting to try and do better...

As I understand the shootout rules you're free to make it better :-)

Jeff


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net