]> granicus.if.org Git - python/commitdiff
Restore the benchmark order to avoid waiting for decimal.py if just the
authorStefan Krah <skrah@bytereef.org>
Tue, 25 Sep 2012 15:07:55 +0000 (17:07 +0200)
committerStefan Krah <skrah@bytereef.org>
Tue, 25 Sep 2012 15:07:55 +0000 (17:07 +0200)
prec=9 test is used.

Modules/_decimal/tests/bench.py

index 23b80b4bedf67af4d31e447beb47ef29ea491ca7..7ab6b4464cec3eb844c579f7587500a1e4321a24 100644 (file)
@@ -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: