From 6b6a1df9960b9f2bb1834ae81290fe04d2f259a6 Mon Sep 17 00:00:00 2001 From: Stefan Krah Date: Tue, 25 Sep 2012 17:07:55 +0200 Subject: [PATCH] Restore the benchmark order to avoid waiting for decimal.py if just the prec=9 test is used. --- Modules/_decimal/tests/bench.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Modules/_decimal/tests/bench.py b/Modules/_decimal/tests/bench.py index 23b80b4bedf..7ab6b4464ce 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: