¡@

Home 

c++ Programming Glossary: large_integer

How to use QueryPerformanceCounter?

http://stackoverflow.com/questions/1739259/how-to-use-queryperformancecounter

double PCFreq 0.0 __int64 CounterStart 0 void StartCounter LARGE_INTEGER li if QueryPerformanceFrequency li cout QueryPerformanceFrequency.. li CounterStart li.QuadPart double GetCounter LARGE_INTEGER li QueryPerformanceCounter li return double li.QuadPart CounterStart..

How can I measure CPU time and wall clock time on both Linux/Windows?

http://stackoverflow.com/questions/17432502/how-can-i-measure-cpu-time-and-wall-clock-time-on-both-linux-windows

#ifdef _WIN32 #include Windows.h double get_wall_time LARGE_INTEGER time freq if QueryPerformanceFrequency freq Handle error return..

How to Calculate Execution Time of a Code Snippet in C++

http://stackoverflow.com/questions/1861294/how-to-calculate-execution-time-of-a-code-snippet-in-c

linux. int64 GetTimeMs64 #ifdef WIN32 Windows FILETIME ft LARGE_INTEGER li Get the amount of 100 nano seconds intervals elapsed since.. elapsed since January 1 1601 UTC and copy it to a LARGE_INTEGER structure. GetSystemTimeAsFileTime ft li.LowPart ft.dwLowDateTime..

::std::vector::at() vs operator[] << surprising results!! 5 to 10 times slower/faster!

http://stackoverflow.com/questions/3269809/stdvectorat-vs-operator-surprising-results-5-to-10-times-slower-f

freq start end diff_Result if QueryPerformanceFrequency LARGE_INTEGER freq throw Not supported freq 1000000 microseconds std vector.. printf Running speed test.. n at QueryPerformanceCounter LARGE_INTEGER start for int i 0 i ELEMENTS_IN_VECTOR i xyz vec.at i QueryPerformanceCounter.. ELEMENTS_IN_VECTOR i xyz vec.at i QueryPerformanceCounter LARGE_INTEGER end diff_Result end start freq printf Result t t u n n diff_Result..

Quick and dirty way to profile your code

http://stackoverflow.com/questions/61278/quick-and-dirty-way-to-profile-your-code

class time_collector boost noncopyable __int64 total LARGE_INTEGER start size_t times const TCHAR name double cpu_frequency cache.. later on is floating point and not truncating if ret 0 LARGE_INTEGER freq QueryPerformanceFrequency freq ret static_cast double.. const TCHAR n times 0 name n total 0 start LARGE_INTEGER in_use false ~time_collector std basic_ostringstream TCHAR..