Why is cPickle so slow?
The default format used by the pickle module is a bit verbose, because it’s designed to produce readable pickles. You can specify a more compact format with the protocol argument.
myPickle = cPickle.dumps(data, protocol=cPickle.HIGHEST_PROTOCOL)