Results with original code: (TEST 1)
Death Adder's Speed Test.
Please don't touch anything or do anything with the machine until this is done!
Time for int test: 1.822000
Time for float test: 2.023000
Time for double test: 2.043000
Results with mathmatic statements commented out, but printf statements left in place: (TEST 2)
Death Adder's Speed Test.
Please don't touch anything or do anything with the machine until this is done!
Time for int test: 1.722000
Time for float test: 1.732000
Time for double test: 1.723000
Results when printf's are taken out of the wrong spot, and put somewhere where they are useful, also integrated the use of the computing variable each time, making it impossible for the compiler to optimize it out: (TEST 3)
Death Adder's Speed Test.
Please don't touch anything or do anything with the machine until this is done!
Time for int test: 0.080000
Time for float test: 0.250000
Time for double test: 0.240000
no optimization flags where used when compiling. As you can tell, the benchmark you all ran was basically showing you how fast printf() can parse a blank string, and realize the variable it got was bogus. If you add up the numbers from TEST 2 and TEST 3, you get TEST1, which is both. TEST2 shows how much power printf takes by itself, and TEST3 shows the real results of mathematic processing of the CPU.
Unfortunalty, the results are useless. No offense to the original programmer, not trying to be mean or anything, but when I saw it, i had to test it as it didn't make much sense to me.