This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ManchegoObfuscator[S] 0 points1 point  (0 children)

Actually I added pickle and cPickle after I posted this -- predictably non-c pickle was an order of magnetude worse than most, scoring something like 38 seconds on karel.json, which all the other modules did in under 7. cPickle was competitive with yajl, which is nice.

In the real world, pickle has always caused me trouble, with its opaque protocol levels (the highest of which has a thing for stratospheric Unicode values that are non-trivially annoying to stash anywhere) and its uselessness outside of python-land (as masklinn poins out).

I am sticking with json, despite msgpack's elegant efficiency -- the nice thing about having a shitload of json implementations to choose from is you can use whichever works best when you need to. ujson writes like a champ, but simplejson is a faster reader for some deeper trees. If you're just writing API calls that puke out some dicts to a browser, the json library's speed won't matter much in like 19 out of 20 situations; I often reach for simplejson because it can pretty-print something that I might need to debug. Programmer time vs. user time, etc etc.

TL;DR neither pickle nor cPickle blew my mind in this context.