Thank you redpriest_
This is the first possible improvement :light:
Here is an issue however -- you cannot compare these times to any other runs because the number of comparisons will vary wildly depending on what the data set you are running on is -- there could be a data set, which potentially would have very few comparisons and one that would have many. Hence you cannot compare this number from any other number irregardless of the platform. I would suggest creating a data set that you would have everyone universally use and that everyone could download -- that way you can make comparisons irregardless of what time you ran the benchmark. As it stands right now, each run will generate different results -- as illustrated a bit above.
I might just generate uniform data set and then hard code it into the benchmark

The .dat file with integers takes only 639kb and the number of comparisons will be the same for every run...
Thank you for your tip.
Hope this helps. Incidentally, I'm sure there's room for optimization but I don't know what your specific intentions regarding this benchmark were...
There are no limitations on the benchmark....
However I am trying to make it
cross-platform compatible, which means that the single version (with small code modifications which are not affecting anything... for example
system("PAUSE"); for Windows...) can be compiled on Windows, Linux, Unix, Mac OS X... etc
So the development of the code will be limited to generic C++ operations compatible with all platforms.
(so far I am successfully, the code compiles on Mandrake 9, Sun OS 5.8, Windows)
Also, this is just an undergraduate summer class . It is not a master thesis, I am not even sure if it is going to even count toward my degree. Therefore I do not have a long therm goal set with this project just yet. But who knows what is going to happen?
As it stands, your benchmark is a poster-child for branches (thousands of comparisons). However, this could be completely eliminated by use of conditional move code that's been available since the pentium pro. Hence, one of the greatest weaknesses of the p4 could be nullified, and I imagine the performance would skyrocket irregardless of the platform, but again, what is your intention with regards to the benchmark? =)
One of the proposes of the benchmark is to make the computer scream. The CPU utilization currently is at constant 100% for every platform. I would imagine that the
conditional move code is available to only Intel processors, therefore it does not fit the goal of it being platform-independant...
Edit: The only goal of the project would be to give at least a ball-park way of estimating the performance of one platform, CPU, to another....(such us G4 to Athlon, G4 to Pentium III etc, etc)
Right now the idea is ridiculously simple but I am positive that the code might be tweaked up in terms of complexity.