Boost logo

Boost :

Subject: Re: [boost] [xpressive] Performance Tuning?
From: Matthew Chambers (matthew.chambers_at_[hidden])
Date: 2009-07-01 17:23:35


Why is Xpressive more readable than using lexical_cast or your
numeric_cast? I've implemented specializations of lexical_cast for
string->numeric conversions using strto[ld]. It is a vast speed
improvement of course, and since those specializations are hidden away
in a header, readability is the same as with normal lexical_casts. Maybe
I'm misunderstanding your use case? Do you not know ahead of time what
the type of the number will be?

-Matt

Dave Jenkins wrote:
>> Whoa! The performance just shot up to a mere 6X the custom code
>> (from 175X). That might well be fast enough to keep the Xpressive
>> version because of its readability!
>
> Can you create thread-local match_results objects and reuse them? If
> so, I think you'll see parsing dwindle to almost nothing and your
> semantic actions will account for the bulk of the time spent.
>
> Regards,
> Dave Jenkins
>


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