[Python-checkins] python/nondist/peps pep-0307.txt,1.27,1.28
tim_one@users.sourceforge.net
tim_one@users.sourceforge.net
2003年2月11日 13:24:03 -0800
Update of /cvsroot/python/python/nondist/peps
In directory sc8-pr-cvs1:/tmp/cvs-serv3280/nondist/peps
Modified Files:
pep-0307.txt
Log Message:
Implemented list batching in cPickle.
Index: pep-0307.txt
===================================================================
RCS file: /cvsroot/python/python/nondist/peps/pep-0307.txt,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** pep-0307.txt 11 Feb 2003 04:50:59 -0000 1.27
--- pep-0307.txt 11 Feb 2003 21:23:59 -0000 1.28
***************
*** 719,722 ****
--- 719,736 ----
+ Pickling of large lists and dicts
+
+ Protocol 1 pickles large lists and dicts "in one piece", which
+ minimizes pickle size, but requires that unpickling create a temp
+ object as large as the object being unpickled. Part of the
+ protocol 2 changes break large lists and dicts into pieces of no
+ more than 1000 elements each, so that unpickling needn't create
+ a temp object larger than needed to hold 1000 elements. This
+ isn't part of protocol 2, however: the opcodes produced are still
+ part of protocol 1. __reduce__ implementations that return the
+ optional new listitems or dictitems iterators also benefit from
+ this unpickling temp-space optimization.
+
+
Copyright