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
Raw File
Tip revision: 2761cd300484e870d15baab1761cd91a3ede9e20 authored by Mark Dickinson on 23 March 2009, 18:26:07 UTC
Blocked revisions 70542 via svnmerge
Tip revision: 2761cd3
.hgignore
.gdb_history
.purify
.svn
BIG5.TXT
BIG5HKSCS-2004.TXT
BIG5HKSCS.TXT
CP932.TXT
CP936.TXT
CP949.TXT
CP950.TXT
EUC-CN.TXT
EUC-JISX0213.TXT
EUC-JP.TXT
EUC-KR.TXT
JOHAB.TXT
Makefile
Makefile.pre
NormalizationTest-3.2.0.txt
NormalizationTest.txt
SHIFTJIS.TXT
SHIFT_JISX0213.TXT
TAGS
autom4te.cache
build
buildno
config.cache
config.log
config.status
config.status.lineno
db_home
gb-18030-2000.xml
platform
pyconfig.h
python
python.exe
reflog.txt
tags
Lib/plat-mac/errors.rsrc.df.rsrc
Doc/tools/sphinx/
Doc/tools/docutils/
Doc/tools/jinja/
Doc/tools/pygments/
Modules/Setup
Modules/Setup.config
Modules/Setup.local
Modules/config.c
Parser/pgen
core

syntax: glob
libpython*.a
*.o
*.pyc
*.pyo
*.pyd
*.cover
*.orig
*.rej
*~
Lib/lib2to3/*.pickle
PCbuild/*.exe
PCbuild/*.dll
PCbuild/*.pdb
PCbuild/*.lib
PCbuild/*.exp
PCbuild/*.o
PCbuild/*.ncb
PCbuild/*.bsc
PCbuild/Win32-temp-*
back to top