3 ms·
Well, with Python it doesn't seem particularly fast. I put together a small test: http://svn.colorstudy.com/home/ianb/msgpack_json_comparison.py http://svn.col
by ianb 14y ago
Well, with Python it doesn't seem particularly fast. I put together a small test: http://svn.colorstudy.com/home/ianb/msgpack_json_comparison.py http://svn.colorstudy.com/home/ianb/msgpack_json_comparison....
It uses some random JSON data I found. msgpack is more compact (87% of the JSON representation), though not dramatically so.
json encode: 5.54msec
simplejson encode: 8.27msec
msgpack encode: 11.4msec
json decode: 16.4msec
simplejson decode: 4.06msec
msgpack decode: 2.84msec
I'm confused about why json is faster at encoding and simplejson is faster at decoding. simplejson is fastest when you combine encoding and decoding.
- masklinn 14y ago> It uses some random JSON data I found. msgpack is more compact (87% of the JSON representation), though not dramatically so. And you can probably end up with a draw if you gzip both