Skip to content

NumPy arrays serialize more slowly with cloudpickle than pickle #58

Description

@mrocklin

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions