[xpressive] Performance Tuning?

View: New views
20 Messages — Rating Filter:   Alert me  
< Prev | 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 | Next >

Re: [xpressive] Performance Tuning?

by Joel de Guzman-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

John Bytheway wrote:

> string::begin() return a non-const reference?), but anyway.  Here are
> the icc results (Intel Core2 Quad 2.83GHz, Gentoo):
>
> Loop count:  10000000
> Parsing:  42.5
> xpressive:  4.28591
> spirit-quick(static):  1.4721
> spirit-quick_new(threadsafe):  1.46949
> spirit-grammar(threadsafe/reusable):  1.59846
>
> and gcc-4.4.0:
>
> Loop count:  10000000
> Parsing:  42.5
> xpressive:  3.62948
> spirit-quick(static):  1.02657
> spirit-quick_new(threadsafe):  1.00637
> spirit-grammar(threadsafe/reusable):  1.01748
>
> gcc 4.3 is still ICEing.

Those are good numbers. It shows that the effect of the
virtual function call of the spirit grammar rules is obviated
out of existence!

For the record, this one shows the xpressive code using spirit
numeric parsers to convert the string to numbers, right?
Will the original OP please (PLEASE!) come forward and post his
original hand-coded program? This is SOOO confusing!

Regards,
--
Joel de Guzman
http://www.boostpro.com
http://spirit.sf.net

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Re: [xpressive] Performance Tuning?

by Edward Grace :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On 19 Jul 2009, at 14:34, Joel de Guzman wrote:

> Edward Grace wrote:
>
>> The actual generic_timer is chronometer agnostic (or should be) so  
>> any
>> function you have to get a given high precision time should just  
>> 'go'.
>> Perhaps if you post up your timer I can try that - or at least  
>> make an
>> interface that will work.
>
> I believe Overmind posted that sometime ago included in the 7Z file
> "Spirit_Price_Code1.7z"

Hi Joel,

It appears to be in your SVN tree - however it doesn't really help.  
It seems to be unapologetically Windows only.

I tried to compile your example but was unsure of what to pull from  
the SVN tree.  Is it Spirit2?  Could you please supply the precise  
svn repository?  I tried these two:

   svn checkout https://spirit.svn.sourceforge.net/svnroot/spirit/ 
trunk/final/boost/
   svn checkout https://spirit.svn.sourceforge.net/svnroot/spirit/ 
trunk/Spirit2x/

but wasn't sure which (if anything) was correct, so didn't know if  
the errors I was getting were because I was looking at the wrong  
thing or doing something dim.

Regarding a cross-platform high frequency timer, I have uploaded  
"cycle.h" from the FFTW project to the Boost Vault,

http://tinyurl.com/maylnc

This appears to support a wide variety of platforms and compilers in  
a transparent manner.  You end up with a call to a function of the form.

    ticks getticks();

on whatever platform you are using (thanks to some macro magic).  It  
should work just fine with Windows and MSVC.

The following

#include "cycle.h"
#include <iostream>
int main() {
        std::cout << getticks() << std::endl;
        return 0;
}

should spit out a large number, usually the number of clock cycles  
since the CPU started.

$ g++-4 -ansi -pedantic test.cpp
In file included from test.cpp:3:
cycle.h:172: warning: ISO C++ 1998 does not support 'long long'
$ ./a.out
32572590328070

If you could confirm that the above snippet works for you and the  
appropriate SVN repository I'll have a bash at that timing again.

After all, if it's written in a standards compliant platform agnostic  
manner if it works for me it's got to work for you ---------- right? ;-)

Cheers,

-ed

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Re: [xpressive] Performance Tuning?

by Hartmut Kaiser :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> >> The actual generic_timer is chronometer agnostic (or should be) so
> >> any
> >> function you have to get a given high precision time should just
> >> 'go'.
> >> Perhaps if you post up your timer I can try that - or at least
> >> make an
> >> interface that will work.
> >
> > I believe Overmind posted that sometime ago included in the 7Z file
> > "Spirit_Price_Code1.7z"
>
> Hi Joel,
>
> It appears to be in your SVN tree - however it doesn't really help.
> It seems to be unapologetically Windows only.

Nope, the high_resolution timer components is cross platform. I tested it on
Windows, Linux, and MacOS.

> I tried to compile your example but was unsure of what to pull from
> the SVN tree.  Is it Spirit2?  Could you please supply the precise
> svn repository?  I tried these two:
>
>    svn checkout https://spirit.svn.sourceforge.net/svnroot/spirit/
> trunk/final/boost/
>    svn checkout https://spirit.svn.sourceforge.net/svnroot/spirit/
> trunk/Spirit2x/
>
> but wasn't sure which (if anything) was correct, so didn't know if
> the errors I was getting were because I was looking at the wrong
> thing or doing something dim.

Please use Boost SVN trunk here:

https://svn.boost.org/svn/boost/trunk/boost/spirit
https://svn.boost.org/svn/boost/trunk/libs/spirit

and make sure to put these directories in front of your normal Boost
installation (V1.37 is required at minimum). The high_resultion_timer.hpp is
here:

https://svn.boost.org/svn/boost/trunk/libs/spirit/benchmarks/high_resolution
_timer.hpp

HTH
Regards Hartmut




_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Re: [xpressive] Performance Tuning?

by Edward Grace :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Dear Hartmut,

>> It appears to be in your SVN tree - however it doesn't really help.
>> It seems to be unapologetically Windows only.
>
> Nope, the high_resolution timer components is cross platform. I  
> tested it on
> Windows, Linux, and MacOS.

This is what I found, when I went searching

https://spirit.svn.sourceforge.net/svnroot/spirit/trunk/final/boost/ 
high_resolution_timer.hpp

clearly I was looking in the wrong place!

Thanks.


-ed
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Re: [xpressive] Performance Tuning?

by John Bytheway-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Joel de Guzman wrote:

> John Bytheway wrote:
>
>> string::begin() return a non-const reference?), but anyway.  Here are
>> the icc results (Intel Core2 Quad 2.83GHz, Gentoo):
>>
>> Loop count:  10000000
>> Parsing:  42.5
>> xpressive:  4.28591
>> spirit-quick(static):  1.4721
>> spirit-quick_new(threadsafe):  1.46949
>> spirit-grammar(threadsafe/reusable):  1.59846
>>
>> and gcc-4.4.0:
>>
>> Loop count:  10000000
>> Parsing:  42.5
>> xpressive:  3.62948
>> spirit-quick(static):  1.02657
>> spirit-quick_new(threadsafe):  1.00637
>> spirit-grammar(threadsafe/reusable):  1.01748
>>
>> gcc 4.3 is still ICEing.
>
> Those are good numbers. It shows that the effect of the
> virtual function call of the spirit grammar rules is obviated
> out of existence!
>
> For the record, this one shows the xpressive code using spirit
> numeric parsers to convert the string to numbers, right?
Correct.

> Will the original OP please (PLEASE!) come forward and post his
> original hand-coded program? This is SOOO confusing!

Well, in case he doesn't, I've thrown together an implementation of
core::to_number based on Robert's description of it.  I had to guess at
the interface, and I didn't verify correctness.  I also had to implement
two error routines; I made them both "throw 0;".

I also tweaked the xpressive code so that it didn't copy the sub_match
objects to strings before using qi to parse out the doubles and ints.
That sped it up slightly (gcc 4.4.0 again):

Loop count:  10000000
Parsing:  42.5
original-custom:  2.08637
xpressive:  2.94329
spirit-quick(static):  1.02784
spirit-quick_new(threadsafe):  1.03306
spirit-grammar(threadsafe/reusable):  1.00213

although I'm slightly concerned with what happened when I changed the
string to be parsed:

Loop count:  10000000
Parsing:  425/500
original-custom:  1.6307
xpressive:  116.992
spirit-quick(static):  0.552722
spirit-quick_new(threadsafe):  0.53429
spirit-grammar(threadsafe/reusable):  0.680257

Why is the xpressive code so slow here?  The parsing is more complex in
this case, but I wouldn't think it was this bad!  Perhaps I broke it
somehow...

New code attached (also includes other minor changes I had to make to
get things to compile).

If someone writes core::numeric_cast then the 'original' xpressive code
can be used.

John Bytheway


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Spirit_Price.cpp (33K) Download Attachment

Re: [xpressive] Performance Tuning?

by Edward Grace :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> Please use Boost SVN trunk here:
>
> https://svn.boost.org/svn/boost/trunk/boost/spirit
> https://svn.boost.org/svn/boost/trunk/libs/spirit
>
> and make sure to put these directories in front of your normal Boost
> installation (V1.37 is required at minimum). The  
> high_resultion_timer.hpp is
> here:
>
> https://svn.boost.org/svn/boost/trunk/libs/spirit/benchmarks/ 
> high_resolution
> _timer.hpp
>

Hi Hartmut,

So,

I did the following and placed them in different directories.
$ svn checkout https://svn.boost.org/svn/boost/trunk/boost/spirit
$ svn checkout https://svn.boost.org/svn/boost/trunk/libs/spirit

In both cases it states "Checked out revision 55030".

And shoved high_resolution_timer.hpp in the appropriate place.

After modifying "uint_parser.cpp" to add

#include <iostream>

I get the following error:

$ g++-4 -I ~/Desktop/boost_spirit/ -I ~Desktop/libs_spirit/ -I ~/
Desktop/boost_1_39_0 -o uint_parser uint_parser.cpp
uint_parser.cpp: In function 'int main()':
uint_parser.cpp:37: error: 'qi::int_' has not been declared
uint_parser.cpp:104: error: 'int_' was not declared in this scope

which seems fairly fundamental.

Do I have the correct revision of Spirit? Any suggestions?

-ed

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

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Re: [xpressive] Performance Tuning?

by Hartmut Kaiser :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> > Please use Boost SVN trunk here:
> >
> > https://svn.boost.org/svn/boost/trunk/boost/spirit
> > https://svn.boost.org/svn/boost/trunk/libs/spirit
> >
> > and make sure to put these directories in front of your normal Boost
> > installation (V1.37 is required at minimum). The
> > high_resultion_timer.hpp is
> > here:
> >
> > https://svn.boost.org/svn/boost/trunk/libs/spirit/benchmarks/
> > high_resolution
> > _timer.hpp
> >
>
> Hi Hartmut,
>
> So,
>
> I did the following and placed them in different directories.
> $ svn checkout https://svn.boost.org/svn/boost/trunk/boost/spirit
> $ svn checkout https://svn.boost.org/svn/boost/trunk/libs/spirit
>
> In both cases it states "Checked out revision 55030".
>
> And shoved high_resolution_timer.hpp in the appropriate place.
>
> After modifying "uint_parser.cpp" to add
>
> #include <iostream>
>
> I get the following error:
>
> $ g++-4 -I ~/Desktop/boost_spirit/ -I ~Desktop/libs_spirit/ -I ~/
> Desktop/boost_1_39_0 -o uint_parser uint_parser.cpp

You don't need to add the libs/spirit directory to your sinclude path.
That's just where the examples, tests and documentation resides. Sorry, I
should have been more explicit.

> uint_parser.cpp: In function 'int main()':
> uint_parser.cpp:37: error: 'qi::int_' has not been declared
> uint_parser.cpp:104: error: 'int_' was not declared in this scope
>
> which seems fairly fundamental.

I certainly can only guess what happens there, but I think the checkout

   svn checkout https://svn.boost.org/svn/boost/trunk/boost/spirit

creates a directory ./spirit. Could you try moving this into a subdirectory
boost, additionally. The final directory structure must be:

   $SPIRIT21_ROOT/boost/spirit (/include/...)

And the -I $SPIRIT21_ROOT needs to be added to the compiler command line.
All spirit headers are included as

#include <boost/spirit/include/...>

that means you need to tell the compiler the base directory the
'boost/spirit/...' is in.

> Do I have the correct revision of Spirit? Any suggestions?

Seems to be the correct revision.

HTH
Regards Hartmut


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Re: [xpressive] Performance Tuning?

by Edward Grace :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> creates a directory ./spirit. Could you try moving this into a  
> subdirectory
> boost, additionally. The final directory structure must be:
>
>    $SPIRIT21_ROOT/boost/spirit (/include/...)
>
> And the -I $SPIRIT21_ROOT needs to be added to the compiler command  
> line.
> All spirit headers are included as
>
> #include <boost/spirit/include/...>
>
> that means you need to tell the compiler the base directory the
> 'boost/spirit/...' is in.

Bingo:  Just a question of getting everything in the right place.

$ g++-4 -I spirit21_root -I $HOME/Desktop/boost_1_39_0 -o uint_parser  
uint_parser.cpp
$ ./uint_parser
initializing input strings...
atoi: 1.42 [s]
strtol: 1.36 [s]
int_: 6.53 [s]

Clearly I need a faster laptop! ;-)

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

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Re: [xpressive] Performance Tuning?

by Daniel Hulme-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hey, John. Your benchmark results make a very interesting addition to
the discussion. Perhaps I can clear something up for you:

On Sun, Jul 19, 2009 at 02:46:33PM +0100, John Bytheway wrote:
> The problem is that parse takes its first argument by reference, and
> va.begin() is a temporary.  If I take a copy of va.begin() and pass that
> it works fine.  I don't see how this compiled in MSVC (does
> string::begin() return a non-const reference?), but anyway.

MSVC allows binding temporaries to non-const reference arguments, as an
extension. It's sort of useful, but it's also sort of annoying -
sometimes both at once.

--
"He is strongly identified with rebels,  you see,  and very popular with
rabbles.   They will follow him  and he will fight  to the last drop  of
their blood."                    Chris Boucher,  Blake's 7  D13  ‘Blake’
http://surreal.istic.org/      The Answer of the Oracle Is Always Death.


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

signature.asc (204 bytes) Download Attachment

Re: [xpressive] Performance Tuning?

by OvermindDL1 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sun, Jul 19, 2009 at 1:15 PM, John Bytheway<jbytheway+boost@...> wrote:
> Loop count:  10000000
> Parsing:  425/500
> original-custom:  1.6307
> xpressive:  116.992
> spirit-quick(static):  0.552722
> spirit-quick_new(threadsafe):  0.53429
> spirit-grammar(threadsafe/reusable):  0.680257

First of all, from what I read of the grammar, "425/500" is not a
valid 'price'.  However, something like "0 425/500" would be, and from
what I read of all parsers, none would parse your format, so I bet if
you checked the return value of my parse function, the return would be
false, indicating it failed parsing.  I would wager that the xpressive
probably is dieing because it does not know how to handle that value.
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Re: [xpressive] Performance Tuning?

by Edward Grace :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Joel,

> I tried a quick shot at it. There are compilation errors indeed.
> Please try to fix the errors first (*). You can get Spirit by getting
> the Boost trunk off SVN.

Ok, once I knew where to look it was easy to get sorted.  I've placed  
my example - based on your code - in the vault.

A typical example using a much smaller buffer (1000) vs (1000000) by  
altering what you called MAX_ITERATION yields the following eye-
popping stats:

$ time ./ejg_uint_parser
initializing input strings...
Calibrating overhead......done
Timer overhead (t_c) ~= : 0.000195267
Jitter               ~= : 2.02505e-14
qi_parse vs atoi    : 1656.34 1661.63 1683.63% faster.
qi_parse vs strtol  : 1521.71 1534.68 1547.75% faster.
strtol vs atoi      : 4.17706 8.94977 10.1224% faster.
qi_parse vs qi_parse : -6.26613 -3.19258 -0.0182475% faster.



Checking that the results are correct...
atoi is behaving itself!
strtol is behaving itself!
qi is behaving itself!


All done!

real    7m37.575s
user    6m47.978s
sys     0m29.151s

N.B. The final timing of qi_parse against itself is zero percent  
within the nominal precision.  At first I thought the 1000% speedup  
of qi_parse was a fake due to some compiler shenanigans.  Now I don't  
think so.  I think it really is that much faster for small buffers!  
Note that this timing experiment took ~6mins.

Using cycle.h:

This was all compiled with:

g++-4 -ansi -pedantic -DNDEBUG -O4 -I. -I spirit21_root -I $HOME/
Desktop/boost_1_39_0 -o ejg_uint_parser ejg_uint_parser.cpp

Where spirit21_root is the spirit library I downloaded earlier.  It  
passes the -ansi -pedantic test and is optimized to the max.


Repeating this with getticks() from cycle.h instead of the boost  
based timer we get:

$ time ./ejg_uint_parser
initializing input strings...
Calibrating overhead......done
Timer overhead (t_c) ~= : 145.797
Jitter               ~= : 5.31361
qi_parse vs atoi    : 1672.05 1674.47 1677.3% faster.
qi_parse vs strtol  : 1543.36 1547.38 1555.7% faster.
strtol vs atoi      : 7.39392 7.79078 7.84302% faster.
qi_parse vs qi_parse : 0 0 0% faster.



Checking that the results are correct...
atoi is behaving itself!
strtol is behaving itself!
qi is behaving itself!


All done!

real    0m25.254s
user    0m22.124s
sys     0m2.496s

Same results - actually better since the experiment is quicker and  
the 95th percentile range is therefore narrower.  Obviously I'm  
suspicious that something funny's going on - would you expect it to  
be capable of being ~10x faster?

> (*) Also, please make sure you try it on Windows too. E.g. <sys/
> time.h>
> is non-standard, AFAIK. My main compiler is VC9. Your library is
> intended to be cross platform, right?

Can you try compiling ejg_uint_parser.cpp?

    http://tinyurl.com/klh2hc

Like I say it's -ansi -pedantic, so 'gotta work'! ;-)

-ed

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

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Re: [xpressive] Performance Tuning?

by OvermindDL1 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sun, Jul 19, 2009 at 5:15 PM, Edward Grace<ej.grace@...> wrote:
> Can you try compiling ejg_uint_parser.cpp?
>
>   http://tinyurl.com/klh2hc

No, because your tinyurl link goes directly to the root of the vault,
not any file, and could not find the file when I placed the name in
the search.  :)
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Re: [xpressive] Performance Tuning?

by Edward Grace :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On 20 Jul 2009, at 00:20, OvermindDL1 wrote:

> On Sun, Jul 19, 2009 at 5:15 PM, Edward  
> Grace<ej.grace@...> wrote:
>> Can you try compiling ejg_uint_parser.cpp?
>>
>>   http://tinyurl.com/klh2hc
>
> No, because your tinyurl link goes directly to the root of the vault,
> not any file, and could not find the file when I placed the name in
> the search.  :)

As the grate [sic] mind Homer would have said

"Doh"

Try this:

http://tinyurl.com/lro5ok

file "ejg_uint_parser.cpp"

-ed

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

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Re: [xpressive] Performance Tuning?

by OvermindDL1 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sun, Jul 19, 2009 at 5:24 PM, Edward Grace<ej.grace@...> wrote:

>
> On 20 Jul 2009, at 00:20, OvermindDL1 wrote:
>
>> On Sun, Jul 19, 2009 at 5:15 PM, Edward Grace<ej.grace@...>
>> wrote:
>>>
>>> Can you try compiling ejg_uint_parser.cpp?
>>>
>>>  http://tinyurl.com/klh2hc
>>
>> No, because your tinyurl link goes directly to the root of the vault,
>> not any file, and could not find the file when I placed the name in
>> the search.  :)
>
> As the grate [sic] mind Homer would have said
>
> "Doh"
>
> Try this:
>
> http://tinyurl.com/lro5ok
>
> file "ejg_uint_parser.cpp"

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
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
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'
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
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)


So yes, this is very much not usable for me, but there is your
buildlog anyway.  :)
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Re: [xpressive] Performance Tuning?

by OvermindDL1 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sun, Jul 19, 2009 at 6:13 PM, OvermindDL1<overminddl1@...> wrote:

> On Sun, Jul 19, 2009 at 5:24 PM, Edward Grace<ej.grace@...> wrote:
>>
>> On 20 Jul 2009, at 00:20, OvermindDL1 wrote:
>>
>>> On Sun, Jul 19, 2009 at 5:15 PM, Edward Grace<ej.grace@...>
>>> wrote:
>>>>
>>>> Can you try compiling ejg_uint_parser.cpp?
>>>>
>>>>  http://tinyurl.com/klh2hc
>>>
>>> No, because your tinyurl link goes directly to the root of the vault,
>>> not any file, and could not find the file when I placed the name in
>>> the search.  :)
>>
>> As the grate [sic] mind Homer would have said
>>
>> "Doh"
>>
>> Try this:
>>
>> http://tinyurl.com/lro5ok
>>
>> file "ejg_uint_parser.cpp"
>
> 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
> 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
> 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'
> 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
> 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)
>
>
> So yes, this is very much not usable for me, but there is your
> buildlog anyway.  :)
>

Er, and yes, this is with MSVC8(SP1) on Windows XP, using Boost Trunk
from about a week ago and your vault files.
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Re: [xpressive] Performance Tuning?

by OvermindDL1 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sun, Jul 19, 2009 at 6:13 PM, OvermindDL1<overminddl1@...> wrote:

> On Sun, Jul 19, 2009 at 6:13 PM, OvermindDL1<overminddl1@...> wrote:
>> On Sun, Jul 19, 2009 at 5:24 PM, Edward Grace<ej.grace@...> wrote:
>>>
>>> On 20 Jul 2009, at 00:20, OvermindDL1 wrote:
>>>
>>>> On Sun, Jul 19, 2009 at 5:15 PM, Edward Grace<ej.grace@...>
>>>> wrote:
>>>>>
>>>>> Can you try compiling ejg_uint_parser.cpp?
>>>>>
>>>>>  http://tinyurl.com/klh2hc
>>>>
>>>> No, because your tinyurl link goes directly to the root of the vault,
>>>> not any file, and could not find the file when I placed the name in
>>>> the search.  :)
>>>
>>> As the grate [sic] mind Homer would have said
>>>
>>> "Doh"
>>>
>>> Try this:
>>>
>>> http://tinyurl.com/lro5ok
>>>
>>> file "ejg_uint_parser.cpp"
>>
>> 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
>> 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
>> 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'
>> 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
>> 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)
>>
>>
>> So yes, this is very much not usable for me, but there is your
>> buildlog anyway.  :)
>>
>
> Er, and yes, this is with MSVC8(SP1) on Windows XP, using Boost Trunk
> from about a week ago and your vault files.
>

The main error there, the ptr_fun, you did not include <functional>.
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Re: [xpressive] Performance Tuning?

by OvermindDL1 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sun, Jul 19, 2009 at 6:19 PM, OvermindDL1<overminddl1@...> wrote:

> On Sun, Jul 19, 2009 at 6:13 PM, OvermindDL1<overminddl1@...> wrote:
>> On Sun, Jul 19, 2009 at 6:13 PM, OvermindDL1<overminddl1@...> wrote:
>>> On Sun, Jul 19, 2009 at 5:24 PM, Edward Grace<ej.grace@...> wrote:
>>>>
>>>> On 20 Jul 2009, at 00:20, OvermindDL1 wrote:
>>>>
>>>>> On Sun, Jul 19, 2009 at 5:15 PM, Edward Grace<ej.grace@...>
>>>>> wrote:
>>>>>>
>>>>>> Can you try compiling ejg_uint_parser.cpp?
>>>>>>
>>>>>>  http://tinyurl.com/klh2hc
>>>>>
>>>>> No, because your tinyurl link goes directly to the root of the vault,
>>>>> not any file, and could not find the file when I placed the name in
>>>>> the search.  :)
>>>>
>>>> As the grate [sic] mind Homer would have said
>>>>
>>>> "Doh"
>>>>
>>>> Try this:
>>>>
>>>> http://tinyurl.com/lro5ok
>>>>
>>>> file "ejg_uint_parser.cpp"
>>>
>>> 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
>>> 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
>>> 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'
>>> 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
>>> 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)
>>>
>>>
>>> So yes, this is very much not usable for me, but there is your
>>> buildlog anyway.  :)
>>>
>>
>> Er, and yes, this is with MSVC8(SP1) on Windows XP, using Boost Trunk
>> from about a week ago and your vault files.
>>
>
> The main error there, the ptr_fun, you did not include <functional>.
>

Sorry for the noise, but the only error I could not get rid of with
single-line edits to your files is:
1>R:\Programming_Projects\Spirit_Price\ejg_uint_parser_timing\other_includes\ejg/timer.cpp(117)
: error C2676: binary '-' : 'ticks' does not define this operator or a
conversion to a type acceptable to the predefined operator
1>        R:\Programming_Projects\Spirit_Price\ejg_uint_parser_timing\other_includes\ejg/timer.cpp(109)
: while compiling class template member function 'void
ejg::generic_timer<ticks>::calibrate_seconds(void)'
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>        ]
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Re: [xpressive] Performance Tuning?

by Edward Grace :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> 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

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Re: [xpressive] Performance Tuning?

by OvermindDL1 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sun, Jul 19, 2009 at 6:47 PM, Edward Grace<ej.grace@...> wrote:
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..

Correct, some old VC headers define min/max for some godforsaken
reason.  Anytime I use the words min/max in any of my files anywhere,
then at the top of the file, after the generic header includes I
always add:

#ifdef min
# undef min
#endif // min
#ifdef max
# undef max
#endif // max

And yea yea, I would like to use GCC to compile, but I currently have
sold my soul to the Visual Assist plugin for Visual Studio.  If any
IDE out there with GCC support had anywhere near the capabilities of
Visual Assist (without Visual Assist, Eclipse is even better then VC),
I would switch in a heart-beat.  Visual Assist just saves me on the
order of a monstrous amount of time, completely addicted by this
point.
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Re: [xpressive] Performance Tuning?

by Steven Watanabe-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

AMDG

Edward Grace wrote:

>> 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'
>
>   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..

Strictly speaking it's windows.h not msvc that #define's min and max.
See
http://www.boost.org/development/requirements.html#Design_and_Programming
for acceptable workarounds.

In Christ,
Steven Watanabe

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
< Prev | 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 | Next >