3 ms·
Python's JSON parser will obviously create Python objects as its output. There is a limit of how much you can gain with clever C string parsing when you still h
by Matumio 11y ago
Python's JSON parser will obviously create Python objects as its output. There is a limit of how much you can gain with clever C string parsing when you still have to create a PyObject* for every item that you parsed. Because of this, I don't think you can gain 1000x performance with C optimizations unless the parser is really horrible (unlikely, considering the widespread use of JSON).
- tim333 11y agoThere are some speed comparisons of Python json parsers here http://stackoverflow.com/questions/706101/python-json-decoding-performance http://stackoverflow.com/questions/706101/python-json-decodi... Yajl (Yet Another JSON Library) seems to go about 10x faster than the standard library json
- perlgeek 11y agoFwiw I know of some benchmarks of Perl deserializers, some written in pure perl, others in C (but still producing Perl data structures), and a speed difference of a faktor 100 is not uncommon.