Crossbones+ - Reputation: 8658
Posted 18 March 2012 - 08:35 PM
(of course this is from a "normal operation" point of view. If you have hardware faults all bets are off, but that is extremely rare).
Other options are limited. The whole point of the QueryPerformanceCounter/Frequency functions is that they abstract away all the different processor speeds/power saving modes/different cores for you and always return a valid result. You could use GetTickCount (and all variants thereof) but their accuracy tends to break down around the 10ms mark. There's also probably a Unix/Linux equivalent for QPC/F but I have not looked into it.
Edit: also, it does not change while the system is running, i.e. it may change from one boot to the next and from one system to the next. This may seem like a tautology but you'd be surprised how many people stop reading at "cannot change" and try and recycle their frequency on multiple different systems. Then the same people cry foul at the documentation.
The slowsort algorithm is a perfect illustration of the multiply and surrender paradigm, which is perhaps the single most important paradigm in the development of reluctant algorithms. The basic multiply and surrender strategy consists in replacing the problem at hand by two or more subproblems, each slightly simpler than the original, and continue multiplying subproblems and subsubproblems recursively in this fashion as long as possible. At some point the subproblems will all become so simple that their solution can no longer be postponed, and we will have to surrender. Experience shows that, in most cases, by the time this point is reached the total work will be substantially higher than what could have been wasted by a more direct approach.
- Pessimal Algorithms and Simplexity Analysis
Moderators - Reputation: 29680
Posted 18 March 2012 - 09:25 PM
So -- in general, the MSDN is right.
Technically, it's wrong, but only because of a few old bits of bad hardware (that break most games, not just yours), which can be fixed with a WinXP patch.
Members - Reputation: 149
Posted 19 March 2012 - 12:06 AM