[Python-checkins] cpython: Restore the benchmark order to avoid waiting for decimal.py if just the
stefan.krah
python-checkins at python.org
Tue Sep 25 17:17:41 CEST 2012
http://hg.python.org/cpython/rev/78061bb4f9c1
changeset: 79171:78061bb4f9c1
parent: 79168:e4e7cca4dc39
user: Stefan Krah <skrah at bytereef.org>
date: Tue Sep 25 17:07:55 2012 +0200
summary:
Restore the benchmark order to avoid waiting for decimal.py if just the
prec=9 test is used.
files:
Modules/_decimal/tests/bench.py | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/Modules/_decimal/tests/bench.py b/Modules/_decimal/tests/bench.py
--- a/Modules/_decimal/tests/bench.py
+++ b/Modules/_decimal/tests/bench.py
@@ -70,11 +70,12 @@
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:
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list