How can I speed up simplejson in Python?

2.7k views Asked by At

simplejson is slow. I wish it to be fast. How might I achieve this?

3

There are 3 answers

3
adamJLev On

If you can update to at least python 2.6, you can use the standard lib json module, which will be faster since it has some speedups.

http://docs.python.org/library/json.html

3
Marc Abramowitz On

Have a look at cjson.

0
Wuvist On

simplejson has built in speedups module writen in C.

Make sure it's compiled.

( For example, check if there is /usr/local/lib/python2.6/dist-packages/simplejson-2.2.1-py2.6-linux-i686.egg/simplejson/_speedups.so file )