简体   繁体   中英

How can I speed up simplejson in Python?

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

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 )

看看cjson

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM