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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.10Windows x86-64

ssrjson_benchmark-0.0.4-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.4-cp39-cp39-win_amd64.whl (3.1 MB view details)

Uploaded CPython 3.9Windows x86-64

ssrjson_benchmark-0.0.4-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.4.tar.gz.

File metadata

  • Download URL: ssrjson_benchmark-0.0.4.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.4.tar.gz
Algorithm Hash digest
SHA256 db31b9c7ed1735d65a0eda597a762ea9dbd2227b493a67b7000064114d670a28
MD5 87c1dafc36230995552c84e798582a5b
BLAKE2b-256 edf67731fb58c78e1150540723cff0c60d5f03395ff2f20c44072f2cd34bb0c5

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.4-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 6f33e42b7895c4b2877c6cd5e7ca9864ecfb2edf9bfa1bf3bc9819049f7deaac
MD5 0e450615dd80c5cafe67ff1c69f924c6
BLAKE2b-256 3e19781da16a636aae1e024a21f6395f6082dc3f83c4c5e9dd6aad9bce51ae1f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.4-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 9ff1819bf2e660e26049cfab4b330d07bbf3a7c6cd96e72e00467d5524f4bdcc
MD5 7ec60a3a637bd3fb3c1a071104220ef7
BLAKE2b-256 a8f2fb7e7b1def0aeae81076a7b78ae183b7137f9c6b8814344392c691a85cb4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.4-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 2d4bfba3d99aa189fbd7a7249d325e2a9e583491069cefcfaa0624ac14174e95
MD5 94747c28d421016b567aea10fe2beee7
BLAKE2b-256 c933c318f4d4ba930cfecdba0a6a9989e151768deba217228254ab8ae62a96ac

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.4-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 ffebaee183ec9613c491b57b11f2d4a7241e9b97e7c221088d346b732298a0c9
MD5 aab40eaf82ccc4965f245660a8e76b06
BLAKE2b-256 243c81751c2c91b772b7986cd746d79396c4cf3026833ee994466b12d468fcc2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 5f5dcf2b0da57b76fc5c31a9a66e3d341290192c225d0acc261ae134ff0b1560
MD5 74abb06c815f101c318db05041f47678
BLAKE2b-256 53e2cb7e36bede7a6dca34edca1e777a86aee69d48119912708e29954e461779

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.4-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 3092c01cc755adaabc5d225cd582d90dbbed95b1f157ed0eaf1be2039f79378e
MD5 4f67847b76ce099bc15ee69597ee0188
BLAKE2b-256 a4aadd963e8624340596f3054e814becb56fcddc68f49cabbff54dab0e4756b7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.4-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 c64459265b360c8ffd37b67692b9680af89516f57f106cd041e2afd5942ef35b
MD5 0dd5ef886a40ccfd6b0c628728f9dac2
BLAKE2b-256 05036f9a9e550c60d06ea213ac975dc4a88c993fcc0f40bf8e27f93d21535a99

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.4-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 afdadb819961dd5acee4753730c842df08d610e24a5f4aaa1498d546ca3ab7f0
MD5 8def861a10fc50e1d305a86f8d43afb3
BLAKE2b-256 f2b996bc6d0eaafc40b7b071328523af7aea3e04ff553d5c3c209bb69d73a16e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.4-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 32e97dfee1ed4bacd3e7a7161520ebaeb0cd7359b5c2c0dfc8212cb1955cf231
MD5 8cfe0103e042cbd6464339d1c662cc95
BLAKE2b-256 e42845227f279bcbe5b28fe28ae80e5a6bda982070343329b461474ad4096839

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.4-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 2a8c95d1b161ae35840c25b48c81b6a65e516db79f4f5c502bd612afcd0df080
MD5 169e3ca00d738d402e3f29b01e4010b3
BLAKE2b-256 c373568a71f71de25189bc53f6f036cf18c8700705fd8007c1bc91db5c0a5e95

See more details on using hashes here.

Provenance

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