Author collinwinter
Recipients collinwinter
Date 2009-04-02.18:53:47
SpamBayes Score 1.16502e-06
Marked as misclassified No
Message-id <1238698431.18.0.108052594941.issue5670@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2009-04-02 18:53:52collinwintersetrecipients: + collinwinter
2009-04-02 18:53:51collinwintersetmessageid: <1238698431.18.0.108052594941.issue5670@psf.upfronthosting.co.za>
2009-04-02 18:53:50collinwinterlinkissue5670 messages
2009-04-02 18:53:49collinwintercreate