Subject: Re: [boost] [xpressive] Performance Tuning?
From: Stewart, Robert (Robert.Stewart_at_[hidden])
Date: 2009-07-28 09:07:47
Edward Grace wrote:
> > Even looking at the min, Spirit is still over 25% faster then
> > string (and that number is with an extremely high amount of
> > statistical confidence). I use Boost.Bind to call the test function
> > so that adds a bit of overhead, which could be noticeable on the
> > faster thing like Spirit, so Spirit could potentially be even faster
> > then the above test indicates.
> Do you think the overhead of calling through boost::bind could be
> comparable to the length of time it takes to run the function?
I don't know -- haven't looked -- where boost::bind was added or why, but any unnecessary overhead should be eliminated unless it is proven to be insignificant.
> Looking at the following,
> testing::run_tests(std::string const & _description,
> tests_type const
> & _tests,
> Parser _parse, unsigned const _iterations)
> I suggest something that simply iterates over the test data but
> does not check for correctness of parsing. Although it won't
> make a fat lot of difference in this case at least it's then
> consistent - you're timing the parsers not the tests for
> equality. The correctness test could then be done later once
> the timings are complete.
I should have done that from the beginning. It would be best, I think, to run through the data once for each test, to verify the result. Then, timing runs can be done without any checks. Both should run from main() each time so that any optimizations are validated before considering the performance.
> Does the size of the test data set matter? In other words do you
> notice similar speedups if the test data will all fit in cache?
Wouldn't that give less representative performance results?
Rob Stewart robert.stewart_at_[hidden]
Software Engineer, Core Software using std::disclaimer;
Susquehanna International Group, LLP http://www.sig.com
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 acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk