Issue1334979
Created on 2005年10月22日 16:44 by Rhamphoryncus, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Messages (3) |
|
msg48884 - (view) |
Author: Adam Olsen (Rhamphoryncus) |
Date: 2005年10月22日 16:44 |
Fix for Bug #1334662. Passes make test (other than
skipped tests), as well as the errors listed in Bug
#1334662.
Although it does remove the division from the loop this
does not seem to make a signifigant speedup. No clue why.
|
|
msg48885 - (view) |
Author: Adam Olsen (Rhamphoryncus) |
Date: 2005年10月22日 20:00 |
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.
|
|
msg48886 - (view) |
Author: Georg Brandl (georg.brandl) * (Python committer) |
Date: 2006年02月19日 12:52 |
Logged In: YES
user_id=1188172
Superseded by patch #1335972.
|
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2022年04月11日 14:56:13 | admin | set | github: 42510 |
| 2005年10月22日 16:44:18 | Rhamphoryncus | create |