Subject: [boost] [RegEx] Performance degradation since 1.36
From: Dave Vest (davevest_at_[hidden])
Date: 2009-10-26 05:08:49
I've just downloaded boost 1.40, compiled the libraries, and re-compiled our
application. Part of our application uses regular expressions extensively to
search through source code and the performance appears to be up to 5 x
slower in release mode than with the 1.36 libraries.
Boost source (no modifications) compiled with Visual Studio 2008 on Win 7.
(Note: 1.36 was compiled with VS 2008 on Win Vista.)
bjam debug release --with-thread --with-regex --with-date_time link=static
boost::regex::flag_type flags = boost::regex::perl | boost::regex::optimize
boost::regex * pengine = new boost::regex(strSampleExpression, flags);
boost::regex_iterator<char const*> itMatch(pszStr, pszStr + nStrLen,
boost::regex_iterator<char const*> itEnd;
if ( itMatch != itEnd )
A simple for(int i=0;i<100000;++i) loop test shows huge differences.
Any ideas why 1.40 is so much slower? Some change in default traits or some
documentation note I've missed?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk