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, 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.2.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.2-cp313-cp313-win_amd64.whl (3.1 MB view details)

Uploaded CPython 3.13Windows x86-64

ssrjson_benchmark-0.0.2-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.2-cp312-cp312-win_amd64.whl (3.1 MB view details)

Uploaded CPython 3.12Windows x86-64

ssrjson_benchmark-0.0.2-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.2-cp311-cp311-win_amd64.whl (3.1 MB view details)

Uploaded CPython 3.11Windows x86-64

ssrjson_benchmark-0.0.2-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.2-cp310-cp310-win_amd64.whl (3.1 MB view details)

Uploaded CPython 3.10Windows x86-64

ssrjson_benchmark-0.0.2-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

ssrjson_benchmark-0.0.2-cp39-cp39-win_amd64.whl (3.1 MB view details)

Uploaded CPython 3.9Windows x86-64

ssrjson_benchmark-0.0.2-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (3.1 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

File details

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

File metadata

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

File hashes

Hashes for ssrjson_benchmark-0.0.2.tar.gz
Algorithm Hash digest
SHA256 0e0818a972f70f05efc1fefcb4c70658fe91fe7866702346401fe0667d46e664
MD5 78325a2ede28f42a4edf9864935d6102
BLAKE2b-256 17bad111a631c07f410c059f1175d473d25a4ff159ad44aff095a6d342a87120

See more details on using hashes here.

Provenance

The following attestation bundles were made for ssrjson_benchmark-0.0.2.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.2-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 9d60c89b3e8d806f5a96df25eb0a919193f5a6d4f56b35a65f02124867f20f69
MD5 648b3a3a7f84db9a08b22b4fb7cc85af
BLAKE2b-256 4c71a6f0947d79325c6c969d56fe171dacbf8eb66924a82d0899450b27c2765d

See more details on using hashes here.

Provenance

The following attestation bundles were made for ssrjson_benchmark-0.0.2-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.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.2-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 c27fc7da10757d4b9a39665738c71587cef8df96667b6b9b6027c582bf80cb1b
MD5 247f0465c5a2f0c341fb3c64e61b5056
BLAKE2b-256 d91e551a36da50d6d6fa9a28ff0ef635564ae167283649b6c5314ce2e24120d6

See more details on using hashes here.

Provenance

The following attestation bundles were made for ssrjson_benchmark-0.0.2-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.2-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 30893d39428a466f96d1ac1ec87846a2e0493774eeba65f5d1746e4097c6aa21
MD5 34bec52b5530f8ec994e543d82042e02
BLAKE2b-256 74be8bcc5f6cb505c1fc878776b7d440c206d3eb7d93ff49477fb77727c8da43

See more details on using hashes here.

Provenance

The following attestation bundles were made for ssrjson_benchmark-0.0.2-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.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.2-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 f260a5d4fe836383ee247911de78bd78372bcab588e83017846670a881718964
MD5 92f078ba178b853892a1271c06563fbe
BLAKE2b-256 da9a6e60df6a1d865ac240f0952d8b3752c3822cfa99fbe00e950b2440688c1e

See more details on using hashes here.

Provenance

The following attestation bundles were made for ssrjson_benchmark-0.0.2-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.2-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 2e994e617268f5b5d86e67960434250cc0df2d3680614c9c2a16b93c6d932cc0
MD5 986bb7f04bc1ee7b4cc510934dded921
BLAKE2b-256 b9159725fc99b2718e7d9078970cd2fce176b774a68e30ac3ebfe7b7e476af39

See more details on using hashes here.

Provenance

The following attestation bundles were made for ssrjson_benchmark-0.0.2-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.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.2-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 dc0271eecbe8a14f345928cfa339fb317097a884b403892694d5323a987baf02
MD5 a81dcd42401d9a5cc442a9906c05123f
BLAKE2b-256 fcd052fcc18582a19768b9cdf82d6c5e7276a9855e18a74f436c905598354050

See more details on using hashes here.

Provenance

The following attestation bundles were made for ssrjson_benchmark-0.0.2-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.2-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 5635473dcff831fd8d40c27091134ac0af05e2730dfb9c87d472eb014263d365
MD5 fed443eea9d6a543ec81448ee3344d62
BLAKE2b-256 812dccae79ec06ea0a0ffea5c589fe7524aa5caa721ac2e8aff3189a4dffaefb

See more details on using hashes here.

Provenance

The following attestation bundles were made for ssrjson_benchmark-0.0.2-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.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.2-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 775a5b86260710b5189ff18ec24b4b04c41739f02d12b5e48206dcef929fc53a
MD5 4a476fd8eb01125f932a2ed5755b7bfc
BLAKE2b-256 c5b80df8b197ad12c869b5c2fc59eb04c5b5630d5f801bb3705323712efdf655

See more details on using hashes here.

Provenance

The following attestation bundles were made for ssrjson_benchmark-0.0.2-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.

File details

Details for the file ssrjson_benchmark-0.0.2-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 3116690e5147da7620034ee6bd6984f526d6d6236ca096e959e6ffe9adb4dd3e
MD5 98910af7a7f4e67f4c4bf5a554f2563f
BLAKE2b-256 6981048da75d06420a5ae197b476fe6ec591f1eae317b33aec3207433eab25ea

See more details on using hashes here.

Provenance

The following attestation bundles were made for ssrjson_benchmark-0.0.2-cp39-cp39-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.2-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.2-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 efe85b283af65227139ab126f4cc19d07eaefa2847216a18353cd6e7902dc100
MD5 dd19fa86e42ec8e67b61af628694368c
BLAKE2b-256 7ceacd3fbe4f01aa49fedab793e18f0cbb89b640aac3074737603da5f999b015

See more details on using hashes here.

Provenance

The following attestation bundles were made for ssrjson_benchmark-0.0.2-cp39-cp39-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