On Mon, 18 Nov 2013 16:02:31 -0600 Tim Peters <tim.pet...@gmail.com> wrote: > [Guido] > >> Clearly the framing is the weakest point of the PEP (== elicits the most > >> bikeshedding). I am also unsure about the value of framing when pickles are > >> written to strings. > > [Antoine] > > It hasn't much value in that case, > > It has _no_ value in that case, yes? It doesn't appear to have _much_ > value in the case of a seekable stream, either - the implementation > has always been free to read ahead then. The real value appears to be > in cases of non-seekable streams. > > > > but the cost is also small (8 bytes every 64KB, roughly). > > >> That's small if your pickle is large, but for small pickles it can add up. > > Which is annoying. 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. Regards Antoine. _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com