New submission from Collin Winter <coll...@gmail.com>: The attached patch adds another version of cPickle.c's batch_dict(), batch_dict_exact(), which is specialized for "type(x) is dict". This provides a nice performance boost when pickling objects that use dictionaries:
Pickle: Min: 2.216 -> 1.858: 19.24% faster Avg: 2.238 -> 1.889: 18.50% faster Significant (t=106.874099, a=0.95) Benchmark is at http://code.google.com/p/unladen-swallow/source/browse/tests/performance/macro_pickle.py (driver is ../perf.py; perf.py was run with "--rigorous -b pickle"). This patch passes all the tests added in issue 5665. I would recommend reviewing that patch first. I'll port to py3k once this is reviewed for trunk. ---------- components: Extension Modules files: cpickle_dict.patch keywords: needs review, patch messages: 85239 nosy: collinwinter severity: normal status: open title: Speed up pickling of dicts in cPickle type: performance versions: Python 2.7 Added file: http://bugs.python.org/file13584/cpickle_dict.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue5670> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com