by pieter · 17y ago · 0 comments
For example, something -99% is 100x as slow as the original, while something +100% is only twice as fast. I think especially the average is wrong. With the above example, the average would be 0%, or 'no change', which IMHO isn't fair.
for(i=0; i<100; i++){ do something }
Then it could just as well have been this: for(i=0; i<10000; i++){ do something }
This change makes that benchmark 100x more important relative to the other benchmarks.IOW, the relative importance of benchmarks in an average is arbitrary. If you measure speedups you give every benchmark the same weight.
The "average" he uses, the geometric mean, doesn't have the problem you describe. The geometric mean of a 99% slowdown and a 100% speedup is computed as sqrt(1/100 * 2) ~= 0.141421356. This means that the "average" slowdown is 1/0.141421356 ~= 7.07x.