Created
August 4, 2012 12:41
-
-
Save mitsuhiko/3257380 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
mitsuhiko at atherton in ~ exited 2 on git:master? workon fireteam-sandbox | |
$ python -mtimeit -s 'from marshal import dumps, loads; x = [[1, 2, 3], [4, 5, 6]]' 'loads(dumps(x))' | |
1000000 loops, best of 3: 1.16 usec per loop | |
mitsuhiko at atherton in ~ on git:master? workon fireteam-sandbox | |
$ python -mtimeit -s 'from copy import deepcopy; x = [[1, 2, 3], [4, 5, 6]]' 'deepcopy(x)' | |
10000 loops, best of 3: 20 usec per loop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment