|
Boost : |
Subject: Re: [boost] [Xpressive] vs libpcre performance
From: Eric Niebler (eric_at_[hidden])
Date: 2008-09-13 22:04:50
Sebastian Redl wrote:
<snip>
> http://www.linux-magazin.de/static/listings/magazin/2008/10/leser/cpp/footnotes.cpp
<snip>
> So to test the performance I took the existing submission and replaced
> libpcre with Xpressive (see attached file). I believe the solutions to
> be functionally equivalent. However, the original takes 6 seconds to
> process a 55MB file, whereas my variation takes ~15 seconds. That's on
> the second run of each program, meaning that the entire file is in the
> OS cache. This seems awfully slow.
It does seem slow, especially considering all the IO, lexical casting
and memory management it's doing, besides the regexing. (I notice that
the pcre version isn't doing any lexical casting, but I can't tell if
it's doing something equivalent.)
Are you sure you compiled with full optimizations turned on, and NDEBUG
defined?
> Has anyone done a proper performance comparison between Xpressive and
> libpcre?
Not really, no. I may look into this, if it doesn't turn out to be a
simple matter of compiler optimization. Where can I find the input file
you're testing with?
Thanks for the heads up.
-- 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