
Using GetTickCount and GetThreadTimes on Windows XP Pro, 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 (GetTickCount) (GetThreadTimes) (in thread) cout 1329 421 42100 enabled log 1469 453 45300 cout "disabled" 15 15 15 disabled log 531 531 531 Here's a little detail on tests cout, 10,000 times, l_dw increments each loop: cout << l_dw << endl; enabled log, 10,000 times: //outside loop: enable_logs("lgTest"); //in loop: BOOST_SCOPEDLOG(l_lgTest) << l_dw << endl; cout "disabled", 1,000,000 times: //outside loop: bool l_bEnabled = false; //in loop: if(l_bEnabled) { cout << l_dw << endl; } disabled log, 1,000,000 times: //outside loop: disable_logs("lgTest"); //this not in loop //in loop: BOOST_SCOPEDLOG(l_lgTest) << l_dw << endl;