Google AdSense

Wednesday, March 25, 2015

An example of using RDTSC, CPUID and RDTSCP to measure performance

Descriptions

  • According to How to Benchmark Code Execution Times on Intel® IA-32 and IA-64 Instruction Set Architectures.

Downloads

Results

  • Loading hello module...
    loop_size:0 >>>> variance(cycles): 2; max_deviation: 4 ;min time: 44
    loop_size:1 >>>> variance(cycles): 27; max_deviation: 1556 ;min time: 44
    loop_size:2 >>>> variance(cycles): 234861; max_deviation: 153248 ;min time: 44
    .........
    .........
    loop_size:997 >>>> variance(cycles): 22; max_deviation: 1412 ;min time: 44
    loop_size:998 >>>> variance(cycles): 40; max_deviation: 1388 ;min time: 44
    loop_size:999 >>>> variance(cycles): 3; max_deviation: 4 ;min time: 44

    total number of spurious min values = 0
    total variance = 34752
    absolute max deviation = 1477968
    variance of variances = 495049069215
    variance of minimum values = 0

Comments

  • The result seems not too bad, at least the min values are equal for 100000 times measures per loop. Although the variance is big, which means that the measures have large differences. By the way, the original article gets the result with total variance 2, which means that the standard error of the measure is only 1.4, amazing.

Resources

No comments:

Post a Comment