diff options
author | Stefan Krah <skrah@bytereef.org> | 2012-09-25 15:07:55 (GMT) |
---|---|---|
committer | Stefan Krah <skrah@bytereef.org> | 2012-09-25 15:07:55 (GMT) |
commit | 6b6a1df9960b9f2bb1834ae81290fe04d2f259a6 (patch) | |
tree | 63786f017d76803016263bb89502ff22a767b5db /Modules/_decimal/tests | |
parent | 296b21a479f300b7622dde6badabc312043177dd (diff) | |
download | cpython-6b6a1df9960b9f2bb1834ae81290fe04d2f259a6.zip cpython-6b6a1df9960b9f2bb1834ae81290fe04d2f259a6.tar.gz cpython-6b6a1df9960b9f2bb1834ae81290fe04d2f259a6.tar.bz2 |
Restore the benchmark order to avoid waiting for decimal.py if just the
prec=9 test is used.
Diffstat (limited to 'Modules/_decimal/tests')
-rw-r--r-- | 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 index 23b80b4..7ab6b44 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: |