Created
April 6, 2012 02:52
-
-
Save nobonobo/2316321 to your computer and use it in GitHub Desktop.
シリアライザの比較
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
ダンプ | |
>>> timeit.timeit('ujson.dumps(data)', setup='import ujson;'+setup, number=10) | |
0.05042099952697754 | |
>>> timeit.timeit('cPickle.dumps(data)', setup='import cPickle;'+setup, number=10) | |
0.2684299945831299 | |
>>> timeit.timeit('json.dumps(data)', setup='import json;'+setup, number=10) | |
0.10378503799438477 | |
パース | |
>>> timeit.timeit('ujson.loads(text)', setup='import ujson;'+setup+';text=ujson.dumps(data)', number=10) | |
0.09584689140319824 | |
>>> timeit.timeit('cPickle.loads(text)', setup='import cPickle;'+setup+';text=cPickle.dumps(data)', number=10) | |
0.12250304222106934 | |
>>> timeit.timeit('json.loads(text)', setup='import json;'+setup+';text=json.dumps(data)', number=10) | |
0.16572809219360352 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
是非 msgpack を!!