Python Interpreters Benchmarks
x64 ArchLinux : AMD® Ryzen 7 4700U®

 performance measurements

Each table row shows performance measurements for this program with a particular command-line input value N.

 N  CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
12.162.1614,896322  0% 0% 0% 100% 0% 0% 0% 0%

Read the ↓ make, command line, and program output logs to see how this program was run.

Read  benchmark to see what this program should do.

 notes

  source code

from __future__ import print_function
import json
import sys

EMPTY = ({}, 200000)
SIMPLE = ({'key1': 0, 'key2': True, 'key3': 'value', 'key4': 'foo', 'key5': 'string'}, 100000)
NESTED = ({'key1': 0, 'key2': SIMPLE[0], 'key3': 'value', 'key4': SIMPLE[0], 'key5': SIMPLE[0], u'key': u'\u0105\u0107\u017c'}, 100000)
HUGE = ([NESTED[0]] * 1000, 100)

cases = [EMPTY, SIMPLE, NESTED, HUGE]

def main(n):
    for i in range(n):
        for case in cases:
            data, count = case
            for i in range(count):
                json_data = json.dumps(data)
                json.loads(json_data)
    print('OK')

main(int(sys.argv[1]))

 make, command-line, and program output logs

 Sun, 23 Apr 2023 09:14:09 GMT

MAKE:
make[1]: Vstupuje se do adresáře „/home/dundee/work/pybenchmarks/bencher/tmp/jsonbench/tmp“
nuitka3 --remove-output jsonbench.nuitka
Nuitka-Options:INFO: Used command line options: --remove-output jsonbench.nuitka
Nuitka-Options:WARNING: You did not specify to follow or include anything but main program. Check options and make sure that is intended.
Nuitka:INFO: Starting Python compilation with Nuitka '1.5' on Python '3.10' commercial grade 'not installed'.
Nuitka:INFO: Completed Python level compilation and optimization.
Nuitka:INFO: Generating source code for C backend compiler.
Nuitka:INFO: Running data composer tool for optimal constant value handling.
Nuitka:INFO: Running C compilation via Scons.
Nuitka-Scons:INFO: Backend C compiler: gcc (gcc).
Nuitka-Scons:INFO: Backend linking program with 7 files (no progress information available).
Nuitka-Scons:WARNING: You are not using ccache.
Nuitka:INFO: Removing build directory 'jsonbench.nuitka.build'.
Nuitka:INFO: Successfully created 'jsonbench.nuitka.bin'.
cp jsonbench.nuitka.bin jsonbench.nuitka_run
make[1]: Opouští se adresář „/home/dundee/work/pybenchmarks/bencher/tmp/jsonbench/tmp“
14.37s to complete and log all make actions

COMMAND LINE:
 ./jsonbench.nuitka_run 1

PROGRAM OUTPUT:
OK

Revised BSD license

  Home   Conclusions   License   Play