diff --git a/pyperformance/data-files/benchmarks/MANIFEST b/pyperformance/data-files/benchmarks/MANIFEST index 1af2a6a0..6d25e408 100644 --- a/pyperformance/data-files/benchmarks/MANIFEST +++ b/pyperformance/data-files/benchmarks/MANIFEST @@ -39,6 +39,8 @@ chaos comprehensions crypto_pyaes dask +decimal_factorial +decimal_pi deepcopy deltablue django_template diff --git a/pyperformance/data-files/benchmarks/bm_decimal_factorial/pyproject.toml b/pyperformance/data-files/benchmarks/bm_decimal_factorial/pyproject.toml index a6ece1c5..e4ee9803 100644 --- a/pyperformance/data-files/benchmarks/bm_decimal_factorial/pyproject.toml +++ b/pyperformance/data-files/benchmarks/bm_decimal_factorial/pyproject.toml @@ -8,3 +8,4 @@ dynamic = ["version"] [tool.pyperformance] name = "decimal_factorial" tags = "decimal" +unsupported_implementations = ["pypy"] # pypy/pypy#5814 diff --git a/pyperformance/data-files/benchmarks/bm_decimal_factorial/run_benchmark.py b/pyperformance/data-files/benchmarks/bm_decimal_factorial/run_benchmark.py index dceba16b..b772b459 100644 --- a/pyperformance/data-files/benchmarks/bm_decimal_factorial/run_benchmark.py +++ b/pyperformance/data-files/benchmarks/bm_decimal_factorial/run_benchmark.py @@ -4,6 +4,7 @@ - 2024-06-14: Michael Droettboom copied this from Modules/_decimal/tests/bench.py in the CPython source and adapted to use pyperf. +- 2026-09-26: Sergey B Kirpichev, use sys.set_int_max_str_digits(0). """ # Original copyright notice in CPython source: @@ -15,6 +16,7 @@ import decimal +import sys import pyperf @@ -38,11 +40,12 @@ def bench_decimal_factorial(): c.Emin = decimal.MIN_EMIN for n in [10000, 100000]: - # C version of decimal _ = factorial(decimal.Decimal(n), 0) if __name__ == "__main__": + sys.set_int_max_str_digits(0) + runner = pyperf.Runner() runner.metadata["description"] = "decimal_factorial benchmark"