Jul 24, 2013, 1:42 PM
Post #3 of 4
If you look at the code, you'll see that cmpthese calls timethis which expects the count param to be 0 or a negative number. The module documentation states:
Re: [anglaissam] Benchmarking count
[In reply to]
The COUNT can be zero or negative: this means the minimum number of CPU seconds to run. A zero signifies the default of 3 seconds.If you pass a number greater than 0, the function will call the timeit() function, which accepts positive numbers, else it will call the countit() function.
The module's documentation doesn't go into the details about the differences between the positive/negative counts. This is one example where it's a good idea to look over the source code to see what it's doing. I've skimmed over it, but haven't reviewed it enough to get a clear understanding of the differences in the count param in each function.