Somewhat more interesting results after redoing loop based on iteration count rather than time. Release builds particularly interesting.

This commit is contained in:
Beman
2013-05-18 10:27:18 -04:00
parent 2b18459db0
commit c0fc4cdf8c
3 changed files with 154 additions and 71 deletions
+4 -1
View File
@@ -35,9 +35,12 @@ namespace
#endif
typedef boost::timer::nanosecond_type nanosecond_t;
//--------------------------------------------------------------------------------------//
nanosecond_t benchmark(timee_func timee, const char* msg,
nanosecond_t overhead = 0)
nanosecond_t overhead = 0)
// Returns: total cpu time (i.e. system time + user time)
{
if (verbose)
cout << "\nRunning benchmark..." << endl;