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
_bsddb.vcproj -rw-r--r-- 26.8 KB
_ctypes.vcproj -rw-r--r-- 13.1 KB
_ctypes_test.vcproj -rw-r--r-- 8.3 KB
_elementtree.vcproj -rw-r--r-- 11.1 KB
_hashlib.vcproj -rw-r--r-- 10.6 KB
_msi.vcproj -rw-r--r-- 8.8 KB
_multiprocessing.vcproj -rw-r--r-- 9.3 KB
_socket.vcproj -rw-r--r-- 8.8 KB
_sqlite3.vcproj -rw-r--r-- 10.7 KB
_ssl.vcproj -rw-r--r-- 10.6 KB
_testcapi.vcproj -rw-r--r-- 8.4 KB
_tkinter.vcproj -rw-r--r-- 9.3 KB
bdist_wininst.vcproj -rw-r--r-- 5.8 KB
build.bat -rw-r--r-- 488 bytes
build_env.bat -rw-r--r-- 25 bytes
build_pgo.bat -rw-r--r-- 1.1 KB
build_ssl.bat -rw-r--r-- 253 bytes
build_ssl.py -rw-r--r-- 9.2 KB
build_tkinter.py -rw-r--r-- 2.2 KB
bz2.vcproj -rw-r--r-- 11.9 KB
debug.vsprops -rw-r--r-- 310 bytes
env.bat -rw-r--r-- 163 bytes
field3.py -rw-r--r-- 974 bytes
idle.bat -rw-r--r-- 284 bytes
installer.bmp -rw-r--r-- 57.4 KB
kill_python.c -rw-r--r-- 5.5 KB
kill_python.vcproj -rw-r--r-- 4.5 KB
make_buildinfo.c -rw-r--r-- 2.9 KB
make_buildinfo.vcproj -rw-r--r-- 2.8 KB
make_versioninfo.vcproj -rw-r--r-- 6.8 KB
pcbuild.sln -rw-r--r-- 40.1 KB
pginstrument.vsprops -rw-r--r-- 921 bytes
pgupdate.vsprops -rw-r--r-- 379 bytes
pyd.vsprops -rw-r--r-- 606 bytes
pyd_d.vsprops -rw-r--r-- 833 bytes
pyexpat.vcproj -rw-r--r-- 10.0 KB
pyproject.vsprops -rw-r--r-- 2.3 KB
python.vcproj -rw-r--r-- 11.7 KB
pythoncore.vcproj -rw-r--r-- 33.6 KB
pythonw.vcproj -rw-r--r-- 11.3 KB
readme.txt -rw-r--r-- 14.6 KB
release.vsprops -rw-r--r-- 311 bytes
rmpyc.py -rw-r--r-- 598 bytes
rt.bat -rw-r--r-- 1.8 KB
select.vcproj -rw-r--r-- 9.0 KB
sqlite3.vcproj -rw-r--r-- 8.9 KB
sqlite3.vsprops -rw-r--r-- 374 bytes
unicodedata.vcproj -rw-r--r-- 8.6 KB
vs9to8.py -rw-r--r-- 1.5 KB
w9xpopen.vcproj -rw-r--r-- 10.0 KB
winsound.vcproj -rw-r--r-- 8.6 KB
x64.vsprops -rw-r--r-- 537 bytes

readme.txt

back to top