[Python-Dev] Accepting PEP 3154 for 3.4?

Tim Peters tim.peters at gmail.com
Mon Nov 18 23:25:07 CET 2013

>> ...
>> It was already annoying when the PROTO opcode was introduced,
>> and the size of small pickles increased by 2 bytes.  That
>> added up too :-(

> Are very small pickles that size-sensitive? I have the impression that
> if 8 bytes vs. e.g. 15 bytes makes a difference for your application,
> you'd be better off with a hand-made format.

The difference between 8 and 15 is, e.g., nearly doubling the amount
of network traffic (for apps that use pickles across processes or

A general approach has no way to guess how it will be used.  For
example, `multiprocessing` uses pickles extensively for inter-process
communication of Python data.  Some users try broadcasting giant
arrays across processes, while others broadcast oceans of tiny
integers (like indices into giant arrays inherited via fork()).

Since pickle intends to be "the" Python serialization format, it
really should try to be friendly for all plausible uses.

More information about the Python-Dev mailing list