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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.10Windows x86-64

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

Uploaded CPython 3.9Windows x86-64

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

File metadata

  • Download URL: ssrjson_benchmark-0.0.1rc1.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.1rc1.tar.gz
Algorithm Hash digest
SHA256 64720487c01b7c8654a4cd212472a81dd59e7202c4f00273daacc3515a6d1d11
MD5 98f380609764c8222707a10aaf35bfaf
BLAKE2b-256 d56ec2e3d7d592d95e2775ba190bbde0b693b5085cdc8d7435eb3c9a8c028deb

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.1rc1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 e0de1deca5c45c98c6c9d8b503954c928661c1d40f64f699a3d372f7e778d87c
MD5 6dfcdee94a222429102131480acd70c9
BLAKE2b-256 a5e475ce52487742ced2f13a4bd366e9bdb8d7abc325a1a7ed23cb7803fc176c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.1rc1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 39180219b0693723519d7b06a444d8f26026b00ccf9068f03a80d600b2e6c1f4
MD5 881bd5459e28e16d40fbee2e7f25ee88
BLAKE2b-256 820b79145719e2c8cf594292c604b9b9a2c99a496a4a34b6cff11288186c7557

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.1rc1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 30a67419b0c1eb57dff48984decda94c872c818e5c13d78a83086277552735dc
MD5 04969769a630d546bc04f0ce4fe9dd75
BLAKE2b-256 9a07238f4e29ba12dff312da1202d0f3e9ca14dcc817f4b7202426f75f9a7a43

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.1rc1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 ff2a3b97b4ad3684fe3d0fad3c5fefcb8a9a0f67b8d084e982db1ca4e038fdd8
MD5 a6df04cab7434a77c3efc65a3be9cc84
BLAKE2b-256 dbc1eb9b5f6cd228b1622841c39eed483d13e04509697511fb42e052c80f5397

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.1rc1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 6250f5f6fe2b0d1d6cadda510bf304c56a8a13612659e3e050c8b7cd25b67181
MD5 74d197289ed20b2ae8abf824d87118e5
BLAKE2b-256 73e772f50bce807693f942405b34cb3b76d96fe2953a3335c3ec341fcb931908

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.1rc1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 7ad717c8aa301b937328d8416de82cd0abbf56ca42026a40a17462878e5fbfe1
MD5 c1ab1aff0bac8f40c738968847dcd551
BLAKE2b-256 b1445daa381977453b3a7a341cbe34eaae0da95222b7ecc027aaca3619efd012

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.1rc1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 61373c380d447ce20b8f6f86785662d27803658b9d989e620f05e543d784563d
MD5 96be6b7f4a259449fc3d09087eeb2f58
BLAKE2b-256 1c770d568cd0cc8f33966b9d584c8d3d0dbcf50dc53e19a290d3fdcba44346e2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.1rc1-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 08719bbb46a023dfd27f225b173d92b692eec81fe04432b267e139902e416f25
MD5 bd085237e5a58f9a8152ab0e7b3e5f84
BLAKE2b-256 9f9b64db5a9c2162a7b76b891fba140a1103de9ff0990c4b801bc4a393e82472

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.1rc1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 1bdee3e2bd305cb886a3304705722a87456ac78c83f6019bbe739e44889578e7
MD5 a30127e6e12048b2f3320f6f737de462
BLAKE2b-256 c00725132382a574d2b9c703a68d037d150483ee80236d5260ea193d97c0292e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.1rc1-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 33726a410d9fee6a88ec0f2462bb0ade6cc26d50ec73ec019f5c182a5cf5be36
MD5 4417021adbb07047281fe80edb2e88b9
BLAKE2b-256 c2b9f2b98abed7c182fb935384139fc8ab2271ebbf28f728ebb6500716bd7b4f

See more details on using hashes here.

Provenance

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