Show More
@@ -1027,7 +1027,10 b' python-profiler package from non-free.""")' | |||
|
1027 | 1027 | worst = max(worst, worst_tuning) |
|
1028 | 1028 | # Check best timing is greater than zero to avoid a |
|
1029 | 1029 | # ZeroDivisionError. |
|
1030 | if worst > 4 * best and best > 0: | |
|
1030 | # In cases where the slowest timing is lesser than a micosecond | |
|
1031 | # we assume that it does not really matter if the fastest | |
|
1032 | # timing is 4 times faster than the slowest timing or not. | |
|
1033 | if worst > 4 * best and best > 0 and worst > 1e-6: | |
|
1031 | 1034 | print("The slowest run took %0.2f times longer than the " |
|
1032 | 1035 | "fastest. This could mean that an intermediate result " |
|
1033 | 1036 | "is being cached " % (worst / best)) |
General Comments 0
You need to be logged in to leave comments.
Login now