Join GitHub today
rdtscbench measures small and large operations using clock cycles as time measurement unit. It uses RDTSC x86 instruction to get clock cycles from CPU registers.
Do not add function prototypes on the c file when you have an header file. Signed-off-by: Peter Senna Tschudin <email@example.com>
Latest commit d5b99e7
Aug 13, 2016
|Failed to load latest commit information.|
rdtscbench measures small and large operations using clock cycles as time measurement unit. It uses RDTSC x86 instruction to get clock cycles from CPU registers rdtscbench is free software licensed under the GPL v2. Peter Senna Tschudin - firstname.lastname@example.org IMPORTANT: Before running make and rdtscbench disable CPU dynamic clock. On Linux: # service cpuspeed stop IMPORTANT 2: If the computer hybernates during the measurement, it may break the measurement. The Makefile runs gethz.sh to cat /proc/cpuinfo looking for the CPU speed. The result is saved in hzdef.h. See example: $ cat /proc/cpuinfo |grep MHz cpu MHz : 2701.000 gethz.sh converts 2701.000 to 2701000000LL and saves it at hzdef.h folders: buf - C code optimization tests getpid - Very simple example of how to use rdtscbench matrix - Measuring C code optimization - http://goo.gl/Pcilt moreExamples - Measuring: gettimeofday(), simplemath, sysconf(), malloc ( 1000000 * sizeof ( char ) ), malloc ( 1000000000 * sizeof ( char ) ), Process Communication over pipes; rdtscbench - The source code of rdtscbench stacko - C code optimization tests