This repository is a copy of the benchmark to measure the performance and correctness of Python JSON libraries. It was copied and inspired from Orjson.
The goal is, using Poetry and Tox, to simplify the execution of the test and thus enable everyone to run the benchmark quickly.
Furthermore some improvements as naming the library version used and code refactoring were added.
To view the results visit the web app hosted on Heroku.
Reproducing the whole benchmark:
poetry run tox
Results can be found here:
Reproducing:
poetry run tox -e setup,update,dataclass
No benchmark available.
No benchmark available.
No benchmark available.
No benchmark available.
Reproducing:
poetry run tox -e setup,update,numpy
No benchmark available.
No benchmark available.
No benchmark available.
No benchmark available.
Serialization and deserialization performance of orjson is better than ultrajson, rapidjson, simplejson, or json. The benchmarks are done on fixtures of real data:
- twitter.json, 631.5KiB, results of a search on Twitter for "一", containing CJK strings, dictionaries of strings and arrays of dictionaries, indented.
- github.json, 55.8KiB, a GitHub activity feed, containing dictionaries of strings and arrays of dictionaries, not indented.
- citm_catalog.json, 1.7MiB, concert data, containing nested dictionaries of strings and arrays of integers, indented.
- canada.json, 2.2MiB, coordinates of the Canadian border in GeoJSON format, containing floats and arrays, indented.
Reproducing:
poetry run tox -e setup,update,latency-dumps,latency-empty,latency-loads
Reproducing:
poetry run tox -e setup,update,memory
Reproducing:
poetry run tox -e setup,update,sort
Reproducing:
poetry run tox -e setup,update,indent