Mark Dickinson <dicki...@gmail.com> added the comment: I'm a bit ambivalent about this patch: I'd like to see string to integer conversions improved, and on the surface it makes sense to special-case base 10 conversions (just as power-of-two bases are already special- cased), but this seems like quite a lot of extra code to debug and maintain just to speed up one aspect of the integer implementation. It would be easy to grow longobject.c by several thousand lines by adding a handful of optimizations of this type.
If you're working with huge integers and care about speed, then you should probably be using gmpy or similar (or something other than Python). And this patch doesn't solve the real problem with converting huge integers to and from decimal strings, which is that the algorithms used have quadratic running time. Amongst quadratic-time algorithms, I'm tempted to call Python's implementation 'good enough'. Gawain, do you have a particular use-case in mind for this optimization? Are there common applications where string <-> int conversion times are critical? ---------- versions: +Python 3.2 _______________________________________ 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