[Python-checkins] r70543 - python/branches/release26-maint

mark.dickinson python-checkins at python.org
Mon Mar 23 19:26:07 CET 2009


Author: mark.dickinson
Date: Mon Mar 23 19:26:07 2009
New Revision: 70543
Log:
Blocked revisions 70542 via svnmerge
........
 r70542 | mark.dickinson | 2009年03月23日 18:25:13 +0000 (2009年3月23日) | 14 lines
 
 Issue #5512: speed up the long division algorithm for Python longs.
 The basic algorithm remains the same; the most significant speedups
 come from the following three changes:
 
 (1) normalize by shifting instead of multiplying and dividing
 (2) the old algorithm usually did an unnecessary extra iteration of
 the outer loop; remove this. As a special case, this means that
 long divisions with a single-digit result run twice as fast as
 before.
 (3) make inner loop much tighter.
 
 Various benchmarks show speedups of between 50% and 150% for long
 integer divisions and modulo operations.
........
Modified:
 python/branches/release26-maint/ (props changed)


More information about the Python-checkins mailing list

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