Message48885
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. |
|
Date |
User |
Action |
Args |
2007-08-23 15:44:16 | admin | link | issue1334979 messages |
2007-08-23 15:44:16 | admin | create | |
|