I would expect pickle and cloudpickle to behave pretty much identically here. Sadly cloudpickle serializes much more slowly.
In [1]: importnumpyasnpIn [2]: data=np.random.randint(0, 255, dtype='u1', size=100000000)
In [3]: importcloudpickle, pickleIn [4]: %timelen(pickle.dumps(data, protocol=pickle.HIGHEST_PROTOCOL))
CPUtimes: user50.9ms, sys: 135ms, total: 186msWalltime: 185msOut[4]: 100000161In [5]: %timelen(cloudpickle.dumps(data, protocol=pickle.HIGHEST_PROTOCOL))
CPUtimes: user125ms, sys: 280ms, total: 404msWalltime: 405msOut[5]: 100000161
I would expect pickle and cloudpickle to behave pretty much identically here. Sadly cloudpickle serializes much more slowly.