Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6b6a1df

Browse files
author
Stefan Krah
committed
Restore the benchmark order to avoid waiting for decimal.py if just the
prec=9 test is used.
1 parent 296b21a commit 6b6a1df

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

Modules/_decimal/tests/bench.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,12 @@ def factorial(n, m):
7070
print("# Calculating pi, 10000 iterations")
7171
print("# ======================================================================\n")
7272

73+
to_benchmark = [pi_float, pi_decimal]
74+
if C is not None:
75+
to_benchmark.insert(1, pi_cdecimal)
76+
7377
for prec in [9, 19]:
7478
print("\nPrecision: %d decimal digits\n" % prec)
75-
to_benchmark = [pi_float, pi_decimal]
76-
if C is not None:
77-
to_benchmark.append(pi_cdecimal)
7879
for func in to_benchmark:
7980
start = time.time()
8081
if C is not None:

0 commit comments

Comments
 (0)