• Alexandre Vassalotti's avatar
    Remove the tuple reuse optimization in _Pickle_FastCall. · b13e6bcb
    Alexandre Vassalotti yazdı
    I have noticed a race-condition occurring on one of the buildbots because of
    this optimization. The function called may release the GIL which means
    multiple threads may end up accessing the shared tuple. I could fix it up by
    storing the tuple to the Pickler and Unipickler object again, but honestly it
    really not worth the trouble.
    
    I ran many benchmarks and the only time the optimization helps is when using a
    fin-memory file, like io.BytesIO on which reads are super cheap, combined with
    pickle protocol less than 4. Even in this contrived case, the speedup is a
    about 5%. For everything else, this optimization does not provide any
    noticable improvements.
    b13e6bcb
Adı
Son kayıt (commit)
Son güncelleme
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...
Tools Loading commit data...
.bzrignore Loading commit data...
.gitignore Loading commit data...
.hgeol Loading commit data...
.hgignore Loading commit data...
.hgtags Loading commit data...
.hgtouch Loading commit data...
LICENSE Loading commit data...
Makefile.pre.in Loading commit data...
README Loading commit data...
config.guess Loading commit data...
config.sub Loading commit data...
configure Loading commit data...
configure.ac Loading commit data...
install-sh Loading commit data...
pyconfig.h.in Loading commit data...
setup.py Loading commit data...