[issue6713] Integer & Long types: Performance improvement of 1.6x to 2x for base 10 conversions

Mark Dickinson report at bugs.python.org
Thu Sep 10 18:39:47 CEST 2009


Mark Dickinson <dickinsm at gmail.com> added the comment:

Sorry:  ignore that last message;  I was talking through my hat.  I 
think I must have been unwittingly building in debug mode.

Ahem.  After a 'make distclean', I get the following results (same specs 
as above, on a 2.53Ghz MacBook Pro / Core 2 Duo).

original: 783.8 ms
patched:  373.5 ms  (2.1 x faster)
patch 2:  323.7 ms  (2.4 x faster)

patch 2 (attached) is Gawain's original patch, but with the base != 
2,8,10,16 code removed and the call to _inplace_divrem1 inlined and 
slightly reorganized.  (No changes to intobject.c.)

----------
Added file: http://bugs.python.org/file14872/base10_conversion_performance_patch2.txt

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6713>
_______________________________________


More information about the Python-bugs-list mailing list