Boost my Ticks!

Started by
21 comments, last by phresnel 14 years, 1 month ago
You could also use OpenMPs timer, which comes at zero library-dependency cost (works on g++, xlc++, icc, msvc, linux, windows).

I have coded this nano-wrapper around it so that I don't sprinkle OpenMP-calls unnecessarily in my code, and so I can easily replace it at any time.

I mean, in the end you have to leave stdc++ anyways if you want a reliable high resolution timer (and in that, boost is not part of stdc++ as is OpenMP ;))
Advertisement
I strongly support the use of OpenMP's timing library. I decided "enough is enough" and actually did a benchmark a couple years ago testing accuracy and reliability of every timer I could get my hands on, on every platform, and OpenMP's came out WAAY WAAY above everyone elses.
Thanks for help. OpenMP does it right.
Maybe off topic, but instead of starting anew thread, since this one is already getting into it...in case of a reliable mutli-core API, what would be the best in terms of portability and capabilities for a standard C++ application?

TBB or OpenMP?

Is TBB tied somehow to Intel's hardware/CPUs?

What're the problems of using OpenMP in C++ program?

TBB seems to have an overhead when doing simple stuff such as for/loop threading in terms of code and performance...



Tbb is superior, a justification of which will have to wait since typing on an iphone sucks
Quote:Original post by cache_hit
Tbb is superior


Depends on what you want to do, I guess.

Multi-threading a game or simulation system...

But is TBB cpu-portable? I mean Intel/AMD?

Is it efficient? Overhead?

Quote:Original post by Sambori
Multi-threading a game or simulation system...

But is TBB cpu-portable? I mean Intel/AMD?

Is it efficient? Overhead?


Yes. Yes. Yes. As with other possibilities.
Quote:Original post by Sambori
Maybe off topic, but instead of starting anew thread, since this one is already getting into it...in case of a reliable mutli-core API, what would be the best in terms of portability and capabilities for a standard C++ application?

TBB or OpenMP?

Is TBB tied somehow to Intel's hardware/CPUs?

What're the problems of using OpenMP in C++ program?

TBB seems to have an overhead when doing simple stuff such as for/loop threading in terms of code and performance...


OpenMP is the cross platform choice and by cross platform I mean really cross platform not just different OS's running on Intel / AMD hardware.
Are these timing issues with multiple cores, and so on something I have to worry about in my simple games?
I can understand for complicated physics simulation that you need a reliable timer, but does it really matter in simple platformers, shoot em ups, small games made by one person?

This topic is closed to new replies.

Advertisement