Subject: Re: [boost] [xpressive] Performance Tuning?
From: Stewart, Robert (Robert.Stewart_at_[hidden])
Date: 2009-07-28 08:39:24
> I did a quick first test at work, just a quick compile, got some
> errors, and quite frankly I do not know how this compiled in gcc
> either. First error is:
> 1>r:\programming_projects\spirit_price\price_parsing\main.cpp(545) :
> error C2373: '_input' : redefinition; different type modifiers
> : see declaration of '_input'
> The relevant code is:
> template <class T>
> extract(char const * & _input, char const * _description,
> std::string const & _input);
That was just a copy paste error in a declaration. GCC 4.1.2 didn't complain about it for me and I have warnings up very high. You can remove the formal parameter names, if you like.
> Why do the first and last function params have the same name (_input)?
> And which one is the real input? Based upon line 566, I changed the
> last _input to _value and that error (and one other) is now gone.
Yes, the third argument is _value.
> Hmm, actually the third error is gone too. Now I am getting lots of
> Warnings (as errors since I by default have warnings treated as
> errors) about double to int64_t cast, both in your normal code on
> line 730
I don't know where you're seeing those warnings. I've addressed all such warnings I get from GCC 4.1.2. My warnings are set to "-Wall -Wno-comment -Wpointer-arith -W -Wconversion -Wno-long-long."
> Also, I added a:
> right before the load_tests call, that changed the load_tests time
> from like 10 seconds to about 2 seconds on my system.
You're assuming the full set of test inputs. I was allowing for testing with reduced input sets. You could read the file twice to count the number of lines and then reserve enough elements to maintain flexibility and, possible, improve performance. However, that's done once before running all of the tests, so I certainly didn't worry about the performance of that initialization.
> Also, why are you using time(0), that only has second accuracy?
It is simple and portable.
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