-
Notifications
You must be signed in to change notification settings - Fork 7
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.
License
petersenna/rdtscbench
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
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 - [email protected] 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
About
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.
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published