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

Uploaded CPython 3.14Windows x86-64

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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.10Windows x86-64

ssrjson_benchmark-0.0.5-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.5.tar.gz.

File metadata

  • Download URL: ssrjson_benchmark-0.0.5.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.5.tar.gz
Algorithm Hash digest
SHA256 11d3545dc6d993c3fa535e48daf3d1cc3bb3a9956e75d289deae2806d825447a
MD5 27377173e5308973fbef2eef9fb2de9d
BLAKE2b-256 273f93a24baa3892c809a6cd58d06edefc1899a1142432a3fcc3b57d7b30e8f9

See more details on using hashes here.

Provenance

The following attestation bundles were made for ssrjson_benchmark-0.0.5.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.5-cp314-cp314-win_amd64.whl.

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.5-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 bc690895240a1157ad275febb8446881d122aa85110dd0bce4af78613ab66320
MD5 1f8e009c4ac7438af36f99df5e352d71
BLAKE2b-256 ed951604ad1e976868b743e7b26c864e6c22a470a6e7e623f0313b5cb3053eae

See more details on using hashes here.

Provenance

The following attestation bundles were made for ssrjson_benchmark-0.0.5-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.5-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.5-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 79c781849e2aab0bd49911689f7a58718021b6bc6e5263ba6db94a96244be017
MD5 9cf655aecbe53c4e5c932e406e1a9332
BLAKE2b-256 b6cfe643d50ea8262f56ae70525bd658f65df8903fe17e382aa7751f917fd526

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.5-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 b7af0a6162ea65dd75654d552caf96fa3303e2369f522dd7828df1a69eecad9b
MD5 6aef3b0aee6739548d9d81d20c7daadf
BLAKE2b-256 8df0024d98d9f5ce7c8c48e190b854a22a4dbf59c7d24ff0f8ee0243658ab2ba

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.5-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 26294b0a5abbf2cde971b53cb3317333a15918300577783f05cc65e490663416
MD5 7168cd994a6f2e426c8631f7250f321c
BLAKE2b-256 d1e7d302862d191aebacfb29f974dd266fcf8e8f428ca8550b95b83393914d9c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.5-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 e7249785592e62d092b47d93900296699dd6460fd1b7f92a0e8f2c2003bd982e
MD5 903775db5da2a7c6fc6b36dafea1620a
BLAKE2b-256 e9fd55fefb438c587881d842ef747e019064ef2fd6d1d526693eb0b7e9d5f14b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.5-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 1ba4091fed9dcc181ec7f56e053a6046859f82cd6376937895e9d674d5d50720
MD5 4a5a846e3dd3d20a83ecbbbae6883b00
BLAKE2b-256 3dd6f98196667f72cf945e64edcde72b9fe2b41c9060e9d4ac9e7f0c0cef3ad7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.5-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 e23c678cb2c817be6f2d7bae42fd558a9ed82c451b8c1b9e6be0d1a62ed383e8
MD5 8baebc91221a95e9c5ba771eefdda80a
BLAKE2b-256 c0818c660ee51ec8103e3321587d57ef34a88343fda2e1e05429b2af7f12faf1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.5-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 4470556b3a4b105e8c8c85786288aad75dfd3fd7561aa2d35398aa3980bbcd28
MD5 788e4160ee184024f865947637d80509
BLAKE2b-256 340f638f67b11e6a808400c9614e1c1393807939e634eb22940815355d3244f4

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.5-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 1c3502829c38dffb302c939428d26f299f8986781aec70067d37a94c37d214dc
MD5 0d7b715a198142f0e4270d8feff829db
BLAKE2b-256 44b375d52d70fcc27a27179358695f57e001f47c0bfd1bcd293ebc138a510712

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.5-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 cb033eee038230dfe2d74b3b33698b19e3784a3263e080e31e5c774ea075dad0
MD5 4c1df383d059a91fd664fed48b8eb549
BLAKE2b-256 957134cdc725d0439169d430d6ed476ea243d958d2a65faa4129ee566e416efc

See more details on using hashes here.

Provenance

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