- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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;

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page