blob: f2868ec4312babfe3feb17a40910832e25bd6aa4 [file] [log] [blame]
64-bit Ubuntu, 3.16GHz Core 2 Duo
==================================
pi benchmark:
+------------+---------------+----------+----------------+--------+---------+-----------+
| | Python floats | cdecimal | cdecimal-nt[1] | gmpy | decimal | java |
+============+===============+==========+================+========+=========+===========+
| 9 digits | 0.12s | 0.27s | 0.24s | 0.52s | 17.61s | 0.38s |
+------------+---------------+----------+----------------+--------+---------+-----------+
| 19 digits | - | 0.58s | 0.55s | 0.52s | 42.75s | 0.73s |
+------------+---------------+----------+----------------+--------+---------+-----------+
| 38 digits | - | 1.32s | 1.21s | 1.07s | - | 1.25s |
+------------+---------------+----------+----------------+--------+---------+-----------+
| 100 digits | - | 4.52s | 4.08s | 3.57s | - | 5.35s |
+------------+---------------+----------+----------------+--------+---------+-----------+
Factorial benchmark (time is calculation + conversion time):
+-----------+-----------------+----------------+----------------+------------------+
| | Python integers | cdecimal | cdecimal-nt[1] | gmpy |
+===========+=================+================+================+==================+
| 100000! | 1.65s + 78.66s | 0.48s + 0.01s | 0.45s + 0.01s | 0.18s + 0.18s |
+-----------+-----------------+----------------+----------------+------------------+
| 1000000! | 78.54s + >2h | 7.84s + 0.07s | 7.56s + 0.07s | 2.76s + 6.52s |
+-----------+-----------------+----------------+----------------+------------------+
| 10000000! | - | 99.17s + 0.87s | 96.08s + 0.87s | 46.57s + 165.80s |
+-----------+-----------------+----------------+----------------+------------------+
[1] --without-threads
32-bit Debian, Athlon 3700+, 1GB of memory
==========================================
pi benchmark:
+------------+---------------+----------+----------------+--------+---------+-----------+
| | Python floats | cdecimal | cdecimal-nt[1] | gmpy | decimal | java |
+============+===============+==========+================+========+=========+===========+
| 9 digits | 0.33s | 0.78s | 0.73s | 1.25s | 34.04s | 1.82s |
+------------+---------------+----------+----------------+--------+---------+-----------+
| 19 digits | - | 1.77s | 1.68s | 1.25s | 80.46s | 1.61s |
+------------+---------------+----------+----------------+--------+---------+-----------+
| 38 digits | - | 3.95s | 3.93s | 2.45s | - | 2.80s |
+------------+---------------+----------+----------------+--------+---------+-----------+
| 100 digits | - | 12.11s | 11.70s | 7.42s | - | 13.72s |
+------------+---------------+----------+----------------+--------+---------+-----------+
Factorial benchmark (time is calculation + conversion time):
+-----------+------------------+-----------------+-----------------+------------------+
| | Python integers | cdecimal | cdecimal-nt[1] | gmpy |
+===========+==================+=================+=================+==================+
| 100000! | 2.72s + 119.81s | 1.73s + 0.01s | 1.71s + 0.01s | 0.36s + 0.34s |
+-----------+------------------+-----------------+-----------------+------------------+
| 1000000! | 103.85s + >2h | 29.99s + 0.12s | 29.69s + 0.12s | 5.47s + 11.30s |
+-----------+------------------+-----------------+-----------------+------------------+
| 10000000! | - | 381.89s + 1.48s | 380.51s + 1.49s | 86.46s + 291.41s |
+-----------+------------------+-----------------+-----------------+------------------+
[1] --without-threads