Quick checkin to make sure I still have the mechanics straight in this

directory.
This commit is contained in:
Tim Peters 2003-02-06 20:29:21 +00:00
parent 9b88421c6a
commit 21a586e1b3
1 changed files with 4 additions and 3 deletions

View File

@ -36,9 +36,7 @@ Introduction
Motivation
Pickling new-style objects causes serious pickle bloat. For
example, the binary pickle for a classic object with one instance
variable takes up 33 bytes; a new-style object with one instance
variable takes up 86 bytes. This was measured as follows:
example,
class C(object): # Omit "(object)" for classic class
pass
@ -46,6 +44,9 @@ Motivation
x.foo = 42
print len(pickle.dumps(x, 1))
The binary pickle for the classic object consumed 33 bytes, and for
the new-style object 86 bytes.
The reasons for the bloat are complex, but are mostly caused by
the fact that new-style objects use __reduce__ in order to be
picklable at all. After ample consideration we've concluded that