Boost logo

Boost :

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


OvermindDL1 wrote:
> I just changed the file to use spirit for parsing where I had used
> lexical_cast got very different timings for xpressive now, so now,
> with xpressive using a bit of spirit I get:
> Loop count: 10000000
> Parsing: 42.5
> xpressive: 15.4841
> spirit-quick(static): 3.01117
> spirit-quick_new(threadsafe): 3.10548
> spirit-grammar(threadsafe/reusable): 3.81694
>
> Vast increase, 3x faster xpressive is now.
> Also, how do you fix that rather bloody massive warning about
> double->int64 truncation?
> I also changed all int64_t to boost::long_long_type since they are the
> same thing anyway (on 32-bit at least?), as well as it being
> multi-platform unlike int64_t.
> My changed file is attached. Do not know if this is considered
> cheating now that xpressive is using some spirit now. ;-)

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

(and the same on all the similar lines)

and indeed I see can't see an appropriate overload in the spirit headers
(in boost trunk), but it's hard to be sure since there are so many
functions called parse!

John Bytheway


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