performance measurements

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

 N  CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
13.563.7411,404322  100% 5% 4% 4%
13.633.8111,144322  100% 5% 5% 9%
13.623.8012,268322  100% 5% 4% 5%

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

Read jsonbench benchmark to see what this program should do.

 notes

Python 3.3.1 (default, Apr 11 2013, 12:45:45)
[GCC 4.7.2] on linux

 jsonbench Python 3 program 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

Mon, 12 Nov 2018 12:07:28 GMT

COMMAND LINE:
/usr/bin/python3 jsonbench.python3 1

PROGRAM OUTPUT:
OK

Revised BSD license

  Home   Conclusions   License   Play