• Raymond Hettinger's avatar
    SF patch #670367: Micro-optimizations for ceval.c · 4bad9ba2
    Raymond Hettinger yazdı
    Make the code slightly shorter, faster, and easier to
    read.
    
    * Eliminate unused DUP_TOPX code for x==1.
    compile.c always generates DUP_TOP instead.
    
    * Since only two cases remain for DUP_TOPX, replace
    the switch-case with if-elseif.
    
    * The in-lined integer compare does a CheckExact on
    both arguments. Since the second is a little more
    likely to fail, test it first.
    
    * The switch-case for IS/IS_NOT and IN/NOT_IN can
    separate the regular and inverted cases with no
    additional work. For all four paths, saves a test and
    jump.
    4bad9ba2
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...
.cvsignore 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...