1. 01 Dec, 2013 10 commits
  2. 30 Nov, 2013 16 commits
  3. 29 Nov, 2013 11 commits
  4. 28 Nov, 2013 3 commits
    • Alexandre Vassalotti's avatar
      Remove explicit empty tuple reuse in cpickle. · 6bf41e54
      Alexandre Vassalotti authored
      PyTuple_New(0) always returns the same empty tuple from its free list anyway,
      so we are not saving much here. Plus, the code where this was used is on
      uncommon run paths.
      6bf41e54
    • Alexandre Vassalotti's avatar
      Remove the tuple reuse optimization in _Pickle_FastCall. · b13e6bcb
      Alexandre Vassalotti authored
      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
    • Eli Bendersky's avatar