This benchmark runs a modified version of the
escape time algorithm
for drawing a Mandelbrot set. It was chosen simply because it contains a
large number of multiplications, additions and subtractions.
This benchmark compares the Python modules cdecimal,
decimal.py and
and Java’s BigDecimal
class. Python’s native binary float type and gmpy’s binary mpf type are included
for a better overview.
The benchmark runs 10000 iterations of calculating pi to various precisions.
This benchmark compares libmpdec, apfloat
and mpfr. Both libmpdec and apfloat use a power of ten base,
so it is no surprise that mpfr leads every benchmark with respect to pure calculation
time [3] . However, when the result of a large calculation needs to be converted to
decimal, libmpdec and apfloat are faster. To show this, the multiplication benchmarks
have been split into calculation + conversion time. All other benchmarks are calculation
time only.
This benchmark compares the Python modules cdecimal and gmpy. Python’s native
integer type is included for a better overview. The benchmark calculates the
factorial of huge numbers. The timings are split into pure calculation time
and conversion time to decimal string.