Message48885
| 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:16 | admin | link | issue1334979 messages |
| 2007年08月23日 15:44:16 | admin | create |
|