I have the same single thread problem, which is something like a simple#include<stdlib.h>#include<iostream>#include<stdio.h>#include<time.h>//#include<ctime.h>int main(){clock_t start=clock();for (int i=0;i<100 000 000; i++){//do something here}double duration = (clock()-start)/(double)CLOCKS_PER_SEC;cout<<endl<<Total consumption time is : <<duration<<seconds <<endl;// or use // printf(\n Total consumption time is : %lf seconds,duration);system(pause);return 0;}Occasionally when I was running them on different computer: older one with XP OS and Pentium V CPU, newer one with Win7 OS x86 and i7 CPU.It is very strange that I found the older computer runs the same program significantly faster. Then I found it is general for other similar programs.Why I got such result? Is it because XP OS is faster than Win7? 
Why the same program runs faster on an older computer?
efficiency
There are so many variables that play into the speed with which a program runs that it is impossible to tell from just your description. For example:Did other programs run at the same time?What is the clock speed of your processor?How was the program compiled and which processor was it optimized for?How long does the program run to begin with -- for example, is it within the accuracy of the timer?Is the loop simple enough for the compiler to optimize it away?Are you timing the entire program execution including loading it, or only the actual run time of the loop?If you time the entire program execution including loading, how does the set of shared libraries that the program links to differ?There are many other questions that make it impossible to answer your question in this generality.