You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In C++, I use a scheme of:
double tic=clock()
double timeElapsedSec=(clock()-tic)/CLOCKS_PER_SEC
to time things in seconds.
However, the timing seems to be accurate in debug mode, but it seems to be inaccurate in release mode. Possible that the -O3 optimization flag does something funky with moving these variables around.
Consider switching to a different timing method in the standard library (if one exists?) or switch to using the boost timers (think it's in the chrono library).
The text was updated successfully, but these errors were encountered:
In C++, I use a scheme of:
double tic=clock()
double timeElapsedSec=(clock()-tic)/CLOCKS_PER_SEC
to time things in seconds.
However, the timing seems to be accurate in debug mode, but it seems to be inaccurate in release mode. Possible that the -O3 optimization flag does something funky with moving these variables around.
Consider switching to a different timing method in the standard library (if one exists?) or switch to using the boost timers (think it's in the chrono library).
The text was updated successfully, but these errors were encountered: