Boost logo

Boost :

From: Andrew Schweitzer (a.schweitzer.grps_at_[hidden])
Date: 2005-11-15 09:08:28


Whoops!

Those were debug build numbers. Here's release build numbers.

These and the debug tests are is vc7.1, using whatever optimization
settings the default project contains. Again, I think these tests are
just a quick check, not a thorough investigation. I'll try to post the
actual test code tomorrow.

results:
                elapsed ms thread time ms ns / call
cout 10981 343 34300
enabled log 1281 203 20300
cout "disabled" 0 0 0
cout "dis" func 16 15 15
disabled log 16 15 15

In release build, I believe my contrived cout "disabled" test was
optimized away. When replaced with a function call it seems to be same
speed as disabled log:
//in another file:
        bool UseCout(){return false;}
        
//outside loop:
        extern bool UseCout();

//in loop:
        if(UseCout())
        {
                cout << l_dw << endl;
        }

Andrew Schweitzer wrote:
[snip]
> recorded time
> to execute some simple pieces of logging code in a loop. Divided by loop
> iterations to get time per iteration. This is a 3Ghz Pentium. Not sure
> how good these tests are, but here's the results:
>
> results:
> elapsed ms thread time ms ns / call
> cout 1329 421 42100
> enabled log 1469 453 45300
> cout "disabled"15 15 15
> disabled log 531 531 531
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
>


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