avgtime - Small D util for your everyday benchmarking needs
Manfred Nowak
svv1999 at hotmail.com
Sun Mar 25 04:46:37 PDT 2012
Andrei Alexandrescu wrote:
> Wait, doesn't a benchmark always measure an algorithm with the same
> input?
The fact that you formulate as a question indicates that you are unsure
about the wright answer---me too, but
1)
surely one can define a benchmark to have this property. But if one
uses this definition, the used input would belong to the benchmark as a
description. I have never seen a description of a benchmark including
the input, but because I am more interested in theory I may have simply
missed such descriptions.
2)
if a probilistic algorithms is used, the meaning of input becomes
unclear, because the state of the machine influences T.
3)
if a heuristic is used by the benchmarked algorithm, then a made up
family of benchmarks can "prove" T= O(n*n) for quick sort.
-manfred
More information about the Digitalmars-d-announce
mailing list