[issue19780] Pickle 4 frame headers optimization

Alexandre Vassalotti report at bugs.python.org
Sat Nov 30 05:23:18 CET 2013


Alexandre Vassalotti added the comment:

> Test data are too small, they all less than frame size.

Ah, good point! It seems your patch helps when the reads are *very* slow and buffering is disabled.

### unpickle_file ###
Min: 1.125320 -> 0.663367: 1.70x faster
Avg: 1.237206 -> 0.701303: 1.76x faster
Significant (t=30.77)
Stddev: 0.12031 -> 0.02634: 4.5682x smaller

That certainly is a nice improvement though that seems to be fairly narrow use case. With more normal read times, the improvement diminishes greatly:

### unpickle_file ###
Min: 0.494841 -> 0.466837: 1.06x faster
Avg: 0.540923 -> 0.511165: 1.06x faster
Significant (t=4.10)
Stddev: 0.03740 -> 0.03510: 1.0657x smaller

----------
Added file: http://bugs.python.org/file32900/unpickle_file_bench_2.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19780>
_______________________________________


More information about the Python-bugs-list mailing list