python - Should I use Pickle or cPickle? -
python has both pickle
, cpickle
modules serialization.
cpickle
has obvious advantage on pickle
: speed. what, if any, advantage pickle
have on cpickle
?
the pickle module implements algorithm turning arbitrary python object series of bytes. process called serializing” object. byte stream representing object can transmitted or stored, , later reconstructed create new object same characteristics.
the cpickle module implements same algorithm, in c instead of python. many times faster python implementation, not allow user subclass pickle. if subclassing not important use, want use cpickle.
source of above information.
Comments
Post a Comment