Staging
v0.8.1
https://github.com/python/cpython
Revision 2761cd300484e870d15baab1761cd91a3ede9e20 authored by Mark Dickinson on 23 March 2009, 18:26:07 UTC, committed by Mark Dickinson on 23 March 2009, 18:26:07 UTC
........
  r70542 | mark.dickinson | 2009-03-23 18:25:13 +0000 (Mon, 23 Mar 2009) | 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.
........
1 parent 4f908dd
History
Tip revision: 2761cd300484e870d15baab1761cd91a3ede9e20 authored by Mark Dickinson on 23 March 2009, 18:26:07 UTC
Blocked revisions 70542 via svnmerge
Tip revision: 2761cd3
File Mode Size
RPM
TextMate
Vim
ACKS -rw-r--r-- 11.1 KB
AIX-NOTES -rw-r--r-- 8.0 KB
BeOS-NOTES -rw-r--r-- 1.4 KB
BeOS-setup.py -rw-r--r-- 23.1 KB
HISTORY -rw-r--r-- 669.3 KB
NEWS -rw-r--r-- 128.0 KB
NEWS.help -rw-r--r-- 2.5 KB
PURIFY.README -rw-r--r-- 4.4 KB
Porting -rw-r--r-- 1.9 KB
README -rw-r--r-- 1.4 KB
README.OpenBSD -rw-r--r-- 1.5 KB
README.coverity -rw-r--r-- 845 bytes
README.klocwork -rw-r--r-- 1.2 KB
README.valgrind -rw-r--r-- 4.3 KB
RFD -rw-r--r-- 3.9 KB
SpecialBuilds.txt -rw-r--r-- 11.9 KB
build.sh -rwxr-xr-x 9.9 KB
cheatsheet -rw-r--r-- 103.6 KB
developers.txt -rw-r--r-- 8.5 KB
find_recursionlimit.py -rw-r--r-- 3.4 KB
gdbinit -rw-r--r-- 4.0 KB
indent.pro -rw-r--r-- 66 bytes
pymemcompat.h -rw-r--r-- 3.1 KB
python-config.in -rw-r--r-- 1.4 KB
python-mode.el -rw-r--r-- 143.5 KB
python.man -rw-r--r-- 12.0 KB
setuid-prog.c -rw-r--r-- 5.3 KB
valgrind-python.supp -rw-r--r-- 6.7 KB
vgrindefs -rw-r--r-- 505 bytes

README

back to top