Skip to main content

benchmark of ssrJSON

Project description

ssrJSON-benchmark

PyPI - Version PyPI - Wheel

The ssrJSON benchmark repository.

Benchmark Results

The benchmark results can be found in website results or GitHub results. Contributing your benchmark result is welcomed.

Quick jump for

Usage

# you may need to install `svglib`, `reportlab` and `py-cpuinfo` as well
pip install ssrjson-benchmark
python -m ssrjson_benchmark

Benchmark options

  • -m output in Markdown instead of PDF.
  • -f <json_path> used exists benchmark json result.
  • --process-bytes <bytes_num> Total process bytes per test, default 1e8.

Notes

  • This repository conducts benchmarking using json, orjson, ujson, and ssrJSON. The dumps benchmark produces str objects, comparing three operations: json.dumps, orjson.dumps followed by decode, and ssrjson.dumps. The dumps_to_bytes benchmark produces bytes objects, comparing three functions: json.dumps followed by encode, orjson.dumps, and ssrjson.dumps_to_bytes.
  • When orjson handles non-ASCII strings, if the cache of the PyUnicodeObject’s UTF-8 representation does not exist, it invokes the PyUnicode_AsUTF8AndSize function to obtain the UTF-8 encoding. This function then caches the UTF-8 representation within the PyUnicodeObject. If the same PyUnicodeObject undergoes repeated encode-decode operations, subsequent calls after the initial one will execute more quickly due to this caching. However, in real-world production scenarios, it is uncommon to perform JSON encode-decode repeatedly on the exact same string object; even identical strings are unlikely to be the same object instance. To achieve benchmark results that better reflect practical use cases, we employ ssrjson.run_unicode_accumulate_benchmark and _benchmark_invalidate_dump_cache functions, which ensure that new PyUnicodeObjects are different for each input every time. (ref: orjson#586)
  • The performance of JSON encoding is primarily constrained by the speed of writing to the buffer, whereas decoding performance is mainly limited by the frequent invocation of CPython interfaces for object creation. During decoding, both ssrJSON and orjson employ short key caching to reduce the number of object creations, and this caching mechanism is global in both cases. As a result, decoding benchmark tests may not accurately reflect the conditions encountered in real-world production environments.
  • The files simple_object.json and simple_object_zh.json do not represent real-world data; they are solely used to compare the performance of the fast path. Therefore, the benchmark results should not be interpreted as indicative of actual performance.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ssrjson_benchmark-0.0.6.tar.gz (3.1 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

ssrjson_benchmark-0.0.6-cp314-cp314-win_amd64.whl (3.1 MB view details)

Uploaded CPython 3.14Windows x86-64

ssrjson_benchmark-0.0.6-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (3.1 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.17+ x86-64

ssrjson_benchmark-0.0.6-cp313-cp313-win_amd64.whl (3.1 MB view details)

Uploaded CPython 3.13Windows x86-64

ssrjson_benchmark-0.0.6-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (3.1 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

ssrjson_benchmark-0.0.6-cp312-cp312-win_amd64.whl (3.1 MB view details)

Uploaded CPython 3.12Windows x86-64

ssrjson_benchmark-0.0.6-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (3.1 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

ssrjson_benchmark-0.0.6-cp311-cp311-win_amd64.whl (3.1 MB view details)

Uploaded CPython 3.11Windows x86-64

ssrjson_benchmark-0.0.6-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (3.1 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

ssrjson_benchmark-0.0.6-cp310-cp310-win_amd64.whl (3.1 MB view details)

Uploaded CPython 3.10Windows x86-64

ssrjson_benchmark-0.0.6-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (3.1 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

File details

Details for the file ssrjson_benchmark-0.0.6.tar.gz.

File metadata

  • Download URL: ssrjson_benchmark-0.0.6.tar.gz
  • Upload date:
  • Size: 3.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for ssrjson_benchmark-0.0.6.tar.gz
Algorithm Hash digest
SHA256 3a465fc6f24656e584d7f1b2c8043a273c83e046c21dcbc53431204b22f8d93e
MD5 3e555e01f4c36e5d498ff0c9c0e95952
BLAKE2b-256 50670ea717ff9ea307f674b13cc10d5bad0cf67d2c7c6b7bbcc92031d577887f

See more details on using hashes here.

Provenance

The following attestation bundles were made for ssrjson_benchmark-0.0.6.tar.gz:

Publisher: release-wheel.yaml on Nambers/ssrJSON-benchmark

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ssrjson_benchmark-0.0.6-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.6-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 8885dad132c79e6e6f7d3278ceeee8664d6fd7e40a0a05e9efe50011f4fb8202
MD5 aaf0319a1441afd6c0cd203e66ce418a
BLAKE2b-256 72e0915bbf538a198444fb708d62375cd80fffc9adc03c4325965e8575790542

See more details on using hashes here.

Provenance

The following attestation bundles were made for ssrjson_benchmark-0.0.6-cp314-cp314-win_amd64.whl:

Publisher: release-wheel.yaml on Nambers/ssrJSON-benchmark

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ssrjson_benchmark-0.0.6-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.6-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 9fea65461d1dade98eb4bf34c32280cb199499c47f141bf9bbc330c10e49ea3b
MD5 b6e73b17ee27095b51640b4113ef17af
BLAKE2b-256 d6f01dd94e7529097220f23a2e38b7dd9b852dd4f0b057d62d599d9a742d690f

See more details on using hashes here.

Provenance

The following attestation bundles were made for ssrjson_benchmark-0.0.6-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl:

Publisher: release-wheel.yaml on Nambers/ssrJSON-benchmark

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ssrjson_benchmark-0.0.6-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.6-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 d18b25eaf992433a6477aa41a0a768399b7467c5c42ec8abc0afedababf9c148
MD5 33491c22c8e6c08e8e8301130dd0dd7b
BLAKE2b-256 f6478b50bf12e8786b9eb0882ef745b77582eb04f5152b801438278c8491428f

See more details on using hashes here.

Provenance

The following attestation bundles were made for ssrjson_benchmark-0.0.6-cp313-cp313-win_amd64.whl:

Publisher: release-wheel.yaml on Nambers/ssrJSON-benchmark

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ssrjson_benchmark-0.0.6-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.6-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 624f700f772d5d7cca2b9be1b459e665a9b9e768fabd8117faa675eae37ca8bd
MD5 a135ee647c547e70f2945622cbed3cbf
BLAKE2b-256 746ee1d890eb6ee44709a4059a98aa07631615322155e314f60c7a5d295d097d

See more details on using hashes here.

Provenance

The following attestation bundles were made for ssrjson_benchmark-0.0.6-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl:

Publisher: release-wheel.yaml on Nambers/ssrJSON-benchmark

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ssrjson_benchmark-0.0.6-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.6-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 a85ea8828238cb345768602b4b1623f86cff4a3f0b109c0443d60a391a83d22f
MD5 e65857b0d2916f82a4f226a995014c81
BLAKE2b-256 f1ef6fdacbbff8cbb093036fae2dba1eb95ee491571222d7a3ca71c1745f7804

See more details on using hashes here.

Provenance

The following attestation bundles were made for ssrjson_benchmark-0.0.6-cp312-cp312-win_amd64.whl:

Publisher: release-wheel.yaml on Nambers/ssrJSON-benchmark

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ssrjson_benchmark-0.0.6-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.6-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 5649c43fd491b3db019760481b8e6e7d3c8c0ea4c34af2bf5da502f31635ea1a
MD5 edcae95015c59763fb3c3e513ac410f7
BLAKE2b-256 bbbfd18cb5dfa566ad78586c9ad10e4d002ca1a467a1b56a5fb239b75b3aa945

See more details on using hashes here.

Provenance

The following attestation bundles were made for ssrjson_benchmark-0.0.6-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl:

Publisher: release-wheel.yaml on Nambers/ssrJSON-benchmark

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ssrjson_benchmark-0.0.6-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.6-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 437f354251af12df32fdc5eab5c4345e7151e598b4b0490818f428d47954df6e
MD5 bc4229961cfd03ca07cbdf1d6ae9d408
BLAKE2b-256 1c6dcf69c9ebcc676860e0f5749ddfa0aa8e12d8468d798cfe78db7978ee887a

See more details on using hashes here.

Provenance

The following attestation bundles were made for ssrjson_benchmark-0.0.6-cp311-cp311-win_amd64.whl:

Publisher: release-wheel.yaml on Nambers/ssrJSON-benchmark

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ssrjson_benchmark-0.0.6-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.6-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 5e7b1f33a4f4ccf3d84779046fda2ffc1f3184739c0af6fcc88fc8076b94eb8a
MD5 49b56c5d81465b59894abe519633728a
BLAKE2b-256 71d8720e913ca0f15871d32d6a95d0d3533fe6474e496bd56b8cd9beb775a62c

See more details on using hashes here.

Provenance

The following attestation bundles were made for ssrjson_benchmark-0.0.6-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl:

Publisher: release-wheel.yaml on Nambers/ssrJSON-benchmark

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ssrjson_benchmark-0.0.6-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.6-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 4613e4bb070b612ca2629563fdfe15a3b3730c5d7a7b00647a2427e5ac1484a3
MD5 dd9f1de67e4ac878684034e7d19751ba
BLAKE2b-256 b38586941a8f9709741124a82eab6dcb16f0707ce66b7064c59a48821cebd948

See more details on using hashes here.

Provenance

The following attestation bundles were made for ssrjson_benchmark-0.0.6-cp310-cp310-win_amd64.whl:

Publisher: release-wheel.yaml on Nambers/ssrJSON-benchmark

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ssrjson_benchmark-0.0.6-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.6-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 1b08e01aae22b7c22906234f3b9e6ca11c38f1278906ae0ff7e206704496479b
MD5 fc3fd395a0e71aaa6e3b6977df8ef393
BLAKE2b-256 66a69e466ad272ecefc689dbb85c9ac7bc743f866db0dbe9e2a476d70c7ade99

See more details on using hashes here.

Provenance

The following attestation bundles were made for ssrjson_benchmark-0.0.6-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl:

Publisher: release-wheel.yaml on Nambers/ssrJSON-benchmark

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page