This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

作者 serhiy.storchaka
收信人 alexandre.vassalotti, pitrou, rhettinger, serhiy.storchaka
日期 2013-05-04.08:08:18
SpamBayes Score -1.0
Marked as misclassified
Message-id <1367654898.78.0.241007787735.issue17900@psf.upfronthosting.co.za>
In-reply-to
内容
In additional the patch decreases the size of the pickled data, speeds up pickling and unpickling.

$ ./python -c "import collections, pickle; od = collections.OrderedDict((i, i) for i in range(100000)); print(len(pickle.dumps(od)))"

Without patch: 1536827.
With patch: 737578.

$ ./python -m timeit -s "from pickle import dumps; import collections; od = collections.OrderedDict((i, i) for i in range(100000))"  "dumps(od)"

Without patch: 454 msec.
With patch: 361 msec.

$ ./python -m timeit -s "from pickle import dumps, loads; import collections; od = collections.OrderedDict((i, i) for i in range(100000)); x = dumps(od)"  "loads(x)"

Without patch: 1.41 sec.
With patch: 1.15 sec.
历史
日期 用户 动作 参数
2013-05-04 08:08:18serhiy.storchaka修改recipients: + serhiy.storchaka, rhettinger, pitrou, alexandre.vassalotti
2013-05-04 08:08:18serhiy.storchaka修改messageid: <1367654898.78.0.241007787735.issue17900@psf.upfronthosting.co.za>
2013-05-04 08:08:18serhiy.storchaka链接issue17900 messages
2013-05-04 08:08:18serhiy.storchaka创建