Created
January 16, 2017 21:02
-
-
Save clayg/c6a5c41b12c7f0c4075386d3f23d6d81 to your computer and use it in GitHub Desktop.
slower than I thought
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clayg:~/Workspace/SwiftStack$ python -m timeit -s 'import pickle; data = pickle.dumps({"%0.3x" % x: None for x in range(0xfff)})' 'pickle.loads(data)' | |
100 loops, best of 3: 18.4 msec per loop | |
clayg:~/Workspace/SwiftStack$ python -m timeit -s 'import cPickle as pickle; data = pickle.dumps({"%0.3x" % x: None for x in range(0xfff)})' 'pickle.loads(data)' | |
1000 loops, best of 3: 1.5 msec per loop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment