homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Rhamphoryncus
Recipients
Date 2005年10月22日.20:00:26
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=12364
This one moves smallmax into a precomputed global table.
$ python2.4 -m timeit 'int("999999999")'
1000000 loops, best of 3: 0.863 usec per loop
$ python2.4 -m timeit 'int("9")'
1000000 loops, best of 3: 0.716 usec per loop
$ ./python -m timeit 'int("999999999")'
1000000 loops, best of 3: 0.766 usec per loop
$ ./python -m timeit 'int("9")'
1000000 loops, best of 3: 0.694 usec per loop
So 0.863 -> 0.766 and 0.716 -> 0.694. 11% and 3%. I
wouldn't bother if it weren't fixing a bug, but maybe the
http://spoj.sphere.pl test will show a larger difference.
History
Date User Action Args
2007年08月23日 15:44:16adminlinkissue1334979 messages
2007年08月23日 15:44:16admincreate

AltStyle によって変換されたページ (->オリジナル) /