Mark Dickinson <dicki...@gmail.com> added the comment: One more iteration of the patch is attached: I rewrote the conversion algorithm to do the base PyLong_BASE to base 10**e conversion first, then output the base 10**e array as individual digits. For OS X/Intel, this seems to speed things up significantly.
(First three values below are the same as before.) OS X 10.6, 64-bit build of Python, 30-bit digits: original: 783.8 ms patch 1: 373.5 ms (2.1 x faster) patch 2: 323.7 ms (2.4 x faster) patch 3: 250.1 ms (3.1 x faster) For OS X 10.5, 32-bit build of Python with 15-bit digits, on the same platform as above, I get the following timings: original: 2045.1 ms patch 1 : 1052.2 ms (1.94 x faster) patch 2 : 1228.7 ms (1.66 x faster) patch 3 : 725.8 ms (2.82 x faster) ---------- Added file: http://bugs.python.org/file14875/base10_conversion_performance_patch3.txt _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue6713> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com