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
Link Copied
What timer are you using ?
Under Windows, clock() timer precision is about 10ms.
You should try using QueryPerformanceCounter instead.
Beware of STL implementation too..
Under VS2012, they have this typedef system_clock high_resolution_clock;
For more complete information about compiler optimizations, see our Optimization Notice.