Boost logo

Boost :

Subject: Re: [boost] [xpressive] Performance Tuning?
From: Stewart, Robert (Robert.Stewart_at_[hidden])
Date: 2009-07-28 08:44:25

OvermindDL1 wrote:
> >
> Okay, I basically just copy/pasted my thread-safe version of my spirit
> parser over and ran it, it returned bad parse with like 13/9 or
> something like that. According to the documentation in the original
> cpp file, only "1", "1 2/3", or "1.2" are valid, not "2/3", so I

>From the beginning, I specified real numbers, whole numbers, mixed numbers, and fractions.

> changed it to support that and ran it again, it parsed successfully
> with all numbers in your tests matching successfully. Here is what it


> printed, using the horribly inaccurate time function:
> Testing string-based parsing
> Testing Xpressive-based parsing
> Testing Spirit-based parsing
> string parsing: 8s
> xpressive parsing: 33s
> spirit parsing: 6s

That's why I offered the iterations argument: increase by, say, 5 times and you'll have numbers you can compare a little more accurately.

> If you do not mind, I am going to add a millisecond accuracy testing
> framework (test.hpp from the boost examples) to the file and change
> all the nasty time calls to it for a more reliable reading. I backed

I don't mind at all. It is helpful to get better accuracy as the test needn't be run with as many iterations.

> For now, I have attached my modified main.cpp
> that includes the thread-safe spirit parser (I have not yet added the
> other two, do you want me to even bother?), and it includes the single

I don't know the difference among them, so I can't answer for including them or not.

> P.S. I would be quite happy if anyone could get rid of that
> freakishly long double->int64_t cast warning in the xpressive code, I
> like clean builds. :)

I don't get the warning, so you'll have to be more specific.

Rob Stewart robert.stewart_at_[hidden]
Software Engineer, Core Software using std::disclaimer;
Susquehanna International Group, LLP

IMPORTANT: The information contained in this email and/or its attachments is confidential. If you are not the intended recipient, please notify the sender immediately by reply and immediately delete this message and all its attachments. Any review, use, reproduction, disclosure or dissemination of this message or any attachment by an unintended recipient is strictly prohibited. Neither this message nor any attachment is intended as or should be construed as an offer, solicitation or recommendation to buy or sell any security or other financial instrument. Neither the sender, his or her employer nor any of their respective affiliates makes any warranties as to the completeness or accuracy of any of the information contained herein or that this message or any of its attachments is free of viruses.

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