• Mark Dickinson's avatar
    Issue #5512: speed up the long division algorithm for Python longs. · 0b666bfd
    Mark Dickinson yazdı
    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.
    0b666bfd
Adı
Son kayıt (commit)
Son güncelleme
..
RPM Loading commit data...
TextMate/Python-Dev.tmbundle Loading commit data...
Vim Loading commit data...
ACKS Loading commit data...
AIX-NOTES Loading commit data...
BeOS-NOTES Loading commit data...
BeOS-setup.py Loading commit data...
HISTORY Loading commit data...
NEWS Loading commit data...
NEWS.help Loading commit data...
PURIFY.README Loading commit data...
Porting Loading commit data...
README Loading commit data...
README.OpenBSD Loading commit data...
README.coverity Loading commit data...
README.klocwork Loading commit data...
README.valgrind Loading commit data...
RFD Loading commit data...
SpecialBuilds.txt Loading commit data...
build.sh Loading commit data...
cheatsheet Loading commit data...
developers.txt Loading commit data...
find_recursionlimit.py Loading commit data...
gdbinit Loading commit data...
indent.pro Loading commit data...
pymemcompat.h Loading commit data...
python-config.in Loading commit data...
python-mode.el Loading commit data...
python.man Loading commit data...
setuid-prog.c Loading commit data...
valgrind-python.supp Loading commit data...
vgrindefs Loading commit data...