Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Dhanraj_C_
Beginner
18 Views

Execution Time variations

Hello,

I am a naive user. Recently I have been studying regarding Threading Building Blocks. I tried executing the Fibonacci program and the results were obtained in milliseconds. When I execute the same program in Java using multithreading, I got the result in nano seconds. Can anyone tell me the reason behind such a huge variation?

Thanks,

Dhanraj 

 

0 Kudos
1 Reply
MLema2
New Contributor I
18 Views

What timer are you using ?
Under Windows, clock() timer precision is about 10ms.  
Y
ou should try using QueryPerformanceCounter instead.

Beware of STL implementation too.. 
Under VS2012, they have this 
typedef system_clock high_resolution_clock;


 

Reply