diff --git a/Lib/pickle.py b/Lib/pickle.py index b812e675c5a..cb27f8ab859 100644 --- a/Lib/pickle.py +++ b/Lib/pickle.py @@ -45,6 +45,9 @@ "2.0", # Protocol 2 ] # Old format versions we can read +# Why use struct.pack() for pickling but marshal.loads() for +# unpickling? struct.pack() is 40% faster than marshal.loads(), but +# marshal.loads() is twice as fast as struct.unpack()! mloads = marshal.loads class PickleError(Exception):