Skip to content

craigchandler/benchmarkTools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

benchmarkTools

Provides 2 functions for cross platform calls for CPUtime and RealTime benchmarking.

Usage:

To benchmark an algorithm's CPU time, call getCPUTime( ) at the beginning and end, then report the difference.

double startTime, endTime;
startTime = getCPUTime( );
...
endTime = getCPUTime( );
fprintf( stderr, "CPU time used = %lf\n", (endTime - startTime) );

To benchmark an algorithm's real time use, call getRealTime( ) at the beginning and end, then report the difference.

double startTime, endTime;
startTime = getRealTime( );
...
endTime = getRealTime( );
fprintf( stderr, "Real time used = %lf\n", (endTime - startTime) );

About

c++ tools for benchmarking code

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published