Message187230
| Author |
alexandre.vassalotti |
| Recipients |
alexandre.vassalotti |
| Date |
2013年04月18日.09:37:46 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1366277868.22.0.694548621851.issue17787@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
I found through profiling that batch_list_exact and batch_dict_exact spent a fair amount of time looking up the pickling function. I have found a way to optimize the lookup using a simple heuristic that assume items in dicts and lists have often a common type. So we have save some time by jumping right to the pickling function we need. Here are the result of running the benchmarks:
### fastpickle ###
Min: 0.593904 -> 0.541918: 1.10x faster
Avg: 0.606811 -> 0.564606: 1.07x faster
Significant (t=10.18)
Stddev: 0.01061 -> 0.02733: 2.5760x larger
Timeline: http://tinyurl.com/bwbvw7j
### pickle_list ###
Min: 0.907891 -> 0.915905: 1.01x slower
Avg: 0.970537 -> 0.948349: 1.02x faster
Significant (t=2.08)
Stddev: 0.07107 -> 0.02526: 2.8136x smaller
Timeline: http://tinyurl.com/cmlymq7 |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2013年04月18日 09:37:48 | alexandre.vassalotti | set | recipients:
+ alexandre.vassalotti |
| 2013年04月18日 09:37:48 | alexandre.vassalotti | set | messageid: <1366277868.22.0.694548621851.issue17787@psf.upfronthosting.co.za> |
| 2013年04月18日 09:37:48 | alexandre.vassalotti | link | issue17787 messages |
| 2013年04月18日 09:37:47 | alexandre.vassalotti | create |
|