• 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
Demo Loading commit data...
Doc Loading commit data...
Grammar Loading commit data...
Include Loading commit data...
Lib Loading commit data...
Mac Loading commit data...
Misc Loading commit data...
Modules Loading commit data...
Objects Loading commit data...
PC Loading commit data...
PCbuild Loading commit data...
Parser Loading commit data...
Python Loading commit data...
RISCOS Loading commit data...
Tools Loading commit data...
.bzrignore Loading commit data...
.hgignore Loading commit data...
.hgtags Loading commit data...
LICENSE Loading commit data...
Makefile.pre.in Loading commit data...
README Loading commit data...
configure Loading commit data...
configure.in Loading commit data...
install-sh Loading commit data...
pyconfig.h.in Loading commit data...
setup.py Loading commit data...