4 ms·
json parser on pypy is competitive, try it (or give us examples where it's not). msgpack needs a better impl, but can be done, database drivers seem to work ove
by fijal 12y ago
json parser on pypy is competitive, try it (or give us examples where it's not). msgpack needs a better impl, but can be done, database drivers seem to work over cffi at reasonable speed.
- arthursilva 12y agoI just checked out and seems like pypy has made some good progress database driver wise! So I went ahead and installed pypy 2.5.1 to compare the json performance. It got better but ujson is just crazy fast. CPython (w/ ujson) is 70% faster to loads and 50% faster to dumps a sample json from my project (50~156kb json). I expect msgpack to be the same. Unfortunately seems like Pypy still doesn't pay off in this app, but it might in many others that don't spend as much time (de)serializing.
- fijal 12y agoujson breaks the spec btw ;-) We tried doing the same thing but cffi callbacks are slow. We should maybe revisit that (and make callbacks faster, we did get better on that)
- arthursilva 12y agoYa, it's limited indeed. I just realized you're a pypy developer. Thanks for all the good work you guys are putting on it!
- fijal 12y agoTo be fair, if json being 50% slower means your whole program is slower, even if other parts are faster, generally means that your bottlenecks are in serializing/unserializing and not in the VM, so we have really nothing to work with here :-)