From: Stefan Krah Date: Tue, 25 Sep 2012 15:07:55 +0000 (+0200) Subject: Restore the benchmark order to avoid waiting for decimal.py if just the X-Git-Tag: v3.3.1rc1~818^2^2~28^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6b6a1df9960b9f2bb1834ae81290fe04d2f259a6;p=python Restore the benchmark order to avoid waiting for decimal.py if just the prec=9 test is used. --- diff --git a/Modules/_decimal/tests/bench.py b/Modules/_decimal/tests/bench.py index 23b80b4bed..7ab6b4464c 100644 --- a/Modules/_decimal/tests/bench.py +++ b/Modules/_decimal/tests/bench.py @@ -70,11 +70,12 @@ print("\n# ===================================================================== print("# Calculating pi, 10000 iterations") print("# ======================================================================\n") +to_benchmark = [pi_float, pi_decimal] +if C is not None: + to_benchmark.insert(1, pi_cdecimal) + for prec in [9, 19]: print("\nPrecision: %d decimal digits\n" % prec) - to_benchmark = [pi_float, pi_decimal] - if C is not None: - to_benchmark.append(pi_cdecimal) for func in to_benchmark: start = time.time() if C is not None: