STINNER Victor <[EMAIL PROTECTED]> added the comment: > I'll investigate the slowdowns
The problem may comes from int64_t on 32 bits CPU. 32x32 -> 64 may be emulated on your CPU and so it's slower. I improved your patch to make it faster, but I lost all my work because of a misuse of GIT... As I remember: - I fixed PyLong_FromLong() for small negative integer - I unrolled the loop in PyLong_FromLong(): the loop is at least called twice (the number has 2 digits or more) - I added special code for operations on two numbers of 1 digit (each) for long_add(), long_mul(), long_div(), long_bitwise(), etc. - and I don't remember the other changes... Oh, I have an old patch. I will attach it to this message. About speed, it was: * unpatched: 20600..20900 pystones * your patch: 19900..20100 pystones * + my changes: 20200..20400 pytones Added file: http://bugs.python.org/file11951/optimize.patch _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue4258> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com