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.
Switch branches/tags
Nothing to show
Clone or download
petersenna Proper fix for matrix tests
Do not add function prototypes on the c file when you have an header
file.

Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com>
Latest commit d5b99e7 Aug 13, 2016
Permalink
Failed to load latest commit information.
buf Minor fixex Feb 10, 2012
getpid Updates the code for a newer gcc Aug 13, 2016
matrix Proper fix for matrix tests Aug 13, 2016
moreExamples Updates the code for a newer gcc Aug 13, 2016
rdtscbench Updates the code for a newer gcc Aug 13, 2016
stacko spelling fix Mar 1, 2012
LICENSE second commit Feb 3, 2012
Makefile second commit Feb 3, 2012
README minor fixeS Feb 10, 2012

README

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 - peter.senna@gmail.com

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