Skip to main content

Benchmark for ssrJSON

Project description

ssrJSON-benchmark

PyPI - Version PyPI - Wheel

The ssrJSON benchmark repository.

Benchmark Results

The benchmark results can be found in 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.1b0.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.1b0-cp313-cp313-win_amd64.whl (3.1 MB view details)

Uploaded CPython 3.13Windows x86-64

ssrjson_benchmark-0.0.1b0-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.1b0-cp312-cp312-win_amd64.whl (3.1 MB view details)

Uploaded CPython 3.12Windows x86-64

ssrjson_benchmark-0.0.1b0-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.1b0-cp311-cp311-win_amd64.whl (3.1 MB view details)

Uploaded CPython 3.11Windows x86-64

ssrjson_benchmark-0.0.1b0-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.1b0-cp310-cp310-win_amd64.whl (3.1 MB view details)

Uploaded CPython 3.10Windows x86-64

ssrjson_benchmark-0.0.1b0-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.1b0-cp39-cp39-win_amd64.whl (3.1 MB view details)

Uploaded CPython 3.9Windows x86-64

ssrjson_benchmark-0.0.1b0-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.1b0.tar.gz.

File metadata

  • Download URL: ssrjson_benchmark-0.0.1b0.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.1b0.tar.gz
Algorithm Hash digest
SHA256 7a12e907f476b012abed39da1b2f8ba3f66921257e566ad08dd7afb8f92fbe0a
MD5 7a214e26719eee9ff97d69e0a7556f6a
BLAKE2b-256 1d1c5d05db53b866adf64d43afe55a82d77f1f1f76e3a8b8eb0122a5fe3e105b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.1b0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 54715d1c34d3f774ae45d01a16a24fcaea3e12d0a491973d0e8b712ba2cad2a1
MD5 4afd6f9da3ded16bdf3743471ec4c097
BLAKE2b-256 4b68fb6dbc076336fa16ef949b6d716eea3490c860366d6825dd7fbd677c1910

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.1b0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 3cdbf4bba6817a7b65147301aaf69dc1ca774ca0811d6174c266b90830b3436e
MD5 e4ad1c9b2bf97eaee07badd36d28d422
BLAKE2b-256 4512c78fee313a1d9fe9884f52acb9a5a5778d4dbf2e1fb68ba0feefa5d598fd

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.1b0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 9dc537854ea770c5376b3fcfd2f00e8b9073e20de57f8c054030124194c00bb5
MD5 0b73d30e9efdd010ee7f882d0df3079f
BLAKE2b-256 d80c3c32d9fb2ac2bc6e7e1e031bc4818612783a42219500fca169897603eed1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.1b0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 e0039eda2d2fc41aa6ee876b5e8efeca328f59a349bca3edd036d7316a254dfa
MD5 2bfaa54cd68dd263d602ca9dba4b3ff4
BLAKE2b-256 37be9e061cdde5bec22aace9cf987f67abbb7e3c20324744587f9df1f5fe459d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.1b0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 6b8692a6ea0b4f5d7bdcd971f07e2d10ac9698a700de4c18372c6d9aba9dc4f2
MD5 4e5653138fa14207c788f6f31fcb31be
BLAKE2b-256 80c2257ba3fcd49ce39fd11f7810339c69336593b3ad65de52759c8a4d9c352a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.1b0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 61d03240a220ee9bcde17207da67cab2d679f3b8d380c616a35fef7da6467d98
MD5 195fc6aca8087bae05276fc5ac67f391
BLAKE2b-256 c44a6a555e7b03ca8c5592c48cb8f5019bd92bdd2eee9e0f3e497c78d44ff8f4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.1b0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 7c05a2a9563dac5ae1f004adb2e049b215c71bf086b809b4d6965d9c5ceaefbf
MD5 889bda905d63e1c5e271973ca7a68f97
BLAKE2b-256 1aecb714e924672a9fa378a86db8888b75426cea1bace9566fcf644c8ed42000

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.1b0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 a9fe69845fb163a31d35907390ddad04cc1647cd67d59a2795d2f226dcd8d5d8
MD5 7bc69d69bd615fd7760ad02342f7a64c
BLAKE2b-256 c0bcb8fcb40e0010e44647cf6b55bb1a5c80750063dc5bd6041be63a51ea6591

See more details on using hashes here.

Provenance

The following attestation bundles were made for ssrjson_benchmark-0.0.1b0-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.1b0-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.1b0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 cfdfd4f5c5983f617f1179313c175abaa6bda964563792b4b48940292c8b2b84
MD5 f4946bdae8529f7cb9e4e1819734fc3d
BLAKE2b-256 d819915b2900081d0d0d7a9f33315eeb9e78a508c5cba953857512547f0343a6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.1b0-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 70ee7f80744e08e3fed330767e57369b1a757d00c5344ddbb4dcb97727845083
MD5 4517bcdb1c505e06e20aab1c9bf8e083
BLAKE2b-256 a844f77ad60197366bea1b4352d683a245066ede46aad30703f77efb378f0aac

See more details on using hashes here.

Provenance

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