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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.10Windows x86-64

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

Uploaded CPython 3.9Windows x86-64

ssrjson_benchmark-0.0.3-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.3.tar.gz.

File metadata

  • Download URL: ssrjson_benchmark-0.0.3.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.3.tar.gz
Algorithm Hash digest
SHA256 8ea0e416e4fe4c527d2434a695f0b51e36a84d3dbe218fc3b4b7c9cc00622848
MD5 9340513fbbf1322a61f61c2758474208
BLAKE2b-256 acc89f7369b8e2efb45d388e1c71c962ebb0a9e1fae12b42befb3228a0bc9fed

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.3-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 d88aecdb7e59b9b184b3251196d0aa27ac23450540eef1b0ffda2ef994f1f32d
MD5 bc0cd1b2c00c702b968c2832e7bc5b45
BLAKE2b-256 f9d935bdb9d95e66d6b1e32072026b4131bbdda7af4686d0a4d8148151c0e1f9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 11855c3b8fb17d7f0b081e6b55ebd3e58264a483bfea7b845dfac8ef82b4ae4a
MD5 196106e0de734e9de0e09bb29e94559b
BLAKE2b-256 84dad36e4b20418c5f20cf2be9f3db7fdaf9871c40bc8a29c387ab95bdcb9fa8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 82cea7e49a7a86fa9f5b902f546714e34b413b8f67aab0474a5361f0d0207bc3
MD5 01f02e2b111c2cd5c70d103047fc28b7
BLAKE2b-256 aa63ac7c399de790230ce6e435688c21918e296dd1ab06492f3af8718604ecc7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 79361766c2c7edf2c704f6b9edf3d024c266482ad791414817d192d57bebaaa2
MD5 531b2f8507f9ffdd51bb2c0ab81af0ee
BLAKE2b-256 ef95bddfce88efce0e541cd2c3daf961fb2dbeca4327da1ee57be695104320e6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 4a60f2a1a2f1429b8f82b9bd741dad48ba802e96fd84b5a9b6be0a29f998d2e1
MD5 188808e9be66f740e298c414e4e177e3
BLAKE2b-256 0863f768dc332a6e52aae9c3780dc7caf94f3457cff70638565459faa4cff861

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 77ee34abde54456b2384ffc04640d464f33efba00a8c071de4f7b2043ef16763
MD5 e68eb45d59d5daaa6d22484151edc108
BLAKE2b-256 9c4b10bf9f444e36fa87e9c5db26fe6c12d95b2addcbea71eebcf90791dac026

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 b206103d842ac818d848eaddc335095e0df858c5c4f8e823d45a99eb599da4ec
MD5 15678c5cf323646ff77414808ee610d1
BLAKE2b-256 df12b95c524f4ea062fb684db5df549286b779f405f535ef654533772e9d8a93

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 7f99ff14db234e81f6787a10a244a452ab29a7a9a9cda5a6435f93130376bc68
MD5 96f240f10340fa48faf61e64fa672ed9
BLAKE2b-256 3a1eb68594a29ef9bf49fefb540bec558eb09a35d1e870ad3f0b624469508390

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 e9b33437b1c1e3e13e51733d4457d86e12430712a7011c473b07d595eff15c5a
MD5 42060ebb093af28653fcbc862f46f22b
BLAKE2b-256 ce7aa4d35a064243b279b8de82c9fe0e79e7ab10b7bde879be2b6aa8a6aac95d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for ssrjson_benchmark-0.0.3-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 62a9043dfcc6440a8ac492fc346e0edd4e296947c713cc7d59b1eb5d3e41fc3d
MD5 d93fbdcb010314fc57927cdd550ee06b
BLAKE2b-256 5f0b2d0186009dae3058ec6190e3bc5706341de307863ae5365c241d1d83d003

See more details on using hashes here.

Provenance

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