3 ms·
There is a Python wrapper for simdjson: https://github.com/TkTech/pysimdjson https://github.com/TkTech/pysimdjson It looks like pysimdjson's biggest performanc
by jefurii 6y ago
There is a Python wrapper for simdjson: https://github.com/TkTech/pysimdjson https://github.com/TkTech/pysimdjson
It looks like pysimdjson's biggest performance gain compared to e.g. orjson is when you can cherry-pick single values out of the JSON and avoid deserializing the whole document.
- welder 6y agoI've tested parsing complete documents with rapidjson vs pysimdjson vs simplejson on production data. Surprisingly, mean 90 times are exactly the same for all three libraries. I'm not re-using the simdjson parser, just doing simdjson.loads().
- TkTech 6y agoThe time is overwhelmingly the cost of conversion to CPython objects, 95-99% of the total time. The actual document parsing to tape is always much faster than rapidjson. No CPython JSON library can get away from this overhead. You see a real benefit when you don't need or want the entire document, and can use the JSON pointer or proxy object interface.