Boost logo

Boost :

Subject: Re: [boost] [xpressive] Performance Tuning?
From: John Bytheway (jbytheway+boost_at_[hidden])
Date: 2009-07-19 09:46:33

OvermindDL1 wrote:
> On Sun, Jul 19, 2009 at 2:29 AM, John Bytheway<jbytheway+boost_at_[hidden]> wrote:
>> That one doesn't compile for me. On line 402:
>> boost::spirit::qi::parse(va.begin(), va.end(),
>> boost::spirit::double_[boost::phoenix::ref(value)]);
>> I get
>> no instance of overloaded function "boost::spirit::qi::parse" matches
>> the argument list
> You are running Boost Trunk? Compiles fine here in MSVC, and I last
> synced to trunk less then a week ago.

The problem is that parse takes its first argument by reference, and
va.begin() is a temporary. If I take a copy of va.begin() and pass that
it works fine. I don't see how this compiled in MSVC (does
string::begin() return a non-const reference?), but anyway. Here are
the icc results (Intel Core2 Quad 2.83GHz, Gentoo):

Loop count: 10000000
Parsing: 42.5
xpressive: 4.28591
spirit-quick(static): 1.4721
spirit-quick_new(threadsafe): 1.46949
spirit-grammar(threadsafe/reusable): 1.59846

and gcc-4.4.0:

Loop count: 10000000
Parsing: 42.5
xpressive: 3.62948
spirit-quick(static): 1.02657
spirit-quick_new(threadsafe): 1.00637
spirit-grammar(threadsafe/reusable): 1.01748

gcc 4.3 is still ICEing.

John Bytheway

Boost list run by bdawes at, gregod at, cpdaniel at, john at