Boost logo

Boost :

Subject: Re: [boost] [xpressive] Performance Tuning?
From: Edward Grace (ej.grace_at_[hidden])
Date: 2009-07-19 20:47:22


> Okay, compiled the code, got this:
> 1>------ Build started: Project: ejg_uint_parser_timing,
> Configuration: Release Win32 ------
> 1>Compiling...
> 1>ejg_uint_parser.cpp
> 1>R:\Programming_Projects\Spirit_Price\ejg_uint_parser_timing
> \other_includes\ejg/statistics/statistics.hpp(417)
> : error C2220: warning treated as error - no 'object' file generated
> 1>R:\Programming_Projects\Spirit_Price\ejg_uint_parser_timing
> \other_includes\ejg/statistics/statistics.hpp(417)
> : warning C4244: 'return' : conversion from 'double' to 'unsigned
> int', possible loss of data

        return std::ceil(-std::log(a)/std::log(2.0));

Ok, fair play, perhaps it's static_cast time.

> 1>R:\Programming_Projects\Spirit_Price\ejg_uint_parser_timing
> \other_includes\ejg/statistics/statistics.cpp(28)
> : error C2039: 'ptr_fun' : is not a member of 'std'
> 1>R:\Programming_Projects\Spirit_Price\ejg_uint_parser_timing
> \other_includes\ejg/statistics/statistics.cpp(28)
> : error C2873: 'ptr_fun' : symbol cannot be used in a
> using-declaration

It jolly well is a member of std::, perhaps I should include
<functional> then!

> 1>R:\Programming_Projects\Spirit_Price\ejg_uint_parser_timing
> \other_includes\ejg/timer.cpp(273)
> : warning C4003: not enough actual parameters for macro 'max'

WTF? What the hell's wrong with this?

   time_raw_atom( _Operation f) {
     ticks t0(0),t1(0),delta(std::numeric_limits<ticks>::max());

Ok. I bet MSVC (that's what you're using right) defines macros
called "min" and "max". I guess that's what happens when one sips
from the teat of the devil. A couple of undefs perhaps..

> 1>R:\Programming_Projects\Spirit_Price\ejg_uint_parser_timing
> \other_includes\ejg/timer.cpp(384)
> : warning C4003: not enough actual parameters for macro 'min'
> 1>R:\Programming_Projects\Spirit_Price\ejg_uint_parser_timing
> \other_includes\ejg/timer.cpp(385)
> : warning C4003: not enough actual parameters for macro 'max'
> 1>using native typeof

     ticks max_global_ticks(std::numeric_limits<ticks>::min()),
       min_global_ticks(std::numeric_limits<ticks>::max());

Ditto....

> 1>R:\Programming_Projects\Spirit_Price\ejg_uint_parser_timing
> \other_includes\ejg/timer.hpp(1018)
> : warning C4512: 'ejg::generic_timer<ticks>' : assignment operator
> could not be generated
> 1> with
> 1> [
> 1> ticks=ticks
> 1> ]
> 1> .\ejg_uint_parser.cpp(133) : see reference to class template
> instantiation 'ejg::generic_timer<ticks>' being compiled
> 1> with
> 1> [
> 1> ticks=ticks
> 1> ]
> 1>Build Time 0:09
> 1>Build log was saved at
> "file://r:\Programming_Projects\Spirit_Price\ejg_uint_parser_timing
> \Release\BuildLog.htm"
> 1>ejg_uint_parser_timing - 3 error(s), 5 warning(s)

Hmm, perhaps confusing the name of the template parameter with the type.

I don't need an assignment operator for ejg::generic_timer<?>. Looks
like it may be an oblique way of moaning about the const member
attribute.

> So yes, this is very much not usable for me,

Ouch.

> but there is your
> buildlog anyway. :)

Thanks.........

......I think. ;-)

Looking back at this email I think it's doable... Give me 10 mins
(then I really must go to bed!).

-ed

------------------------------------------------
"No more boom and bust." -- Dr. J. G. Brown, 1997


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