Case Van Horsen added the comment:

mpmath is a library for arbitrary-precision floating-point arithmetic. It uses 
Python's native long type or gmpy2's mpz type for computations. It is available 
at https://pypi.python.org/pypi/mpmath.

The test suite can be run directly from the source tree. The test suite 
includes timing information for individual tests and for the the entire test. 
Sample invocation:

~/src/mpmath-0.19/mpmath/tests$ time py36 runtests.py -local

For example, I've tried to optimize gmpy2's handling of binary operations 
between its mpz type and short Python integers. I've found it to provide useful 
results: improvements that are significant on a micro-benchmark (say 20%) will 
usually cause a small but repeatable improvement. And some improvements that 
looked good on a micro-benchmark would slow down mpmath.

I ran the mpmath test suite with Python 3.6 and with the fastint6 patch. The 
overall increase when using Python long type was about 1%. When using gmpy2's 
mpz type, there was a slowdown of about 2%.

I will run more tests tonight.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue21955>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to