performance measurements

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

 N  CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
13.513.6711,808323  2% 100% 5% 5%
13.603.7711,252323  10% 100% 8% 8%
13.503.6611,216323  4% 100% 5% 2%

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

 jsonbench Cython 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]

cdef main(int 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, 15 Oct 2018 12:12:56 GMT

MAKE:
make[1]: Vstupuje se do adresáře „/home/dundee/workspace/benchmarksgame/bencher/tmp/jsonbench/tmp“
cp jsonbench.cython `echo jsonbench.cython | sed 's/cython-..//' | sed 's/.cython//'`.pyx
cythonize -3 -bi `echo jsonbench.cython | sed 's/cython-..//' | sed 's/.cython//'`.pyx
Compiling /home/dundee/workspace/benchmarksgame/bencher/tmp/jsonbench/tmp/jsonbench.pyx because it changed.
[1/1] Cythonizing /home/dundee/workspace/benchmarksgame/bencher/tmp/jsonbench/tmp/jsonbench.pyx
running build_ext
building 'jsonbench' extension
creating /home/dundee/workspace/benchmarksgame/bencher/tmp/jsonbench/tmp/tmpsjkjamvy/home
creating /home/dundee/workspace/benchmarksgame/bencher/tmp/jsonbench/tmp/tmpsjkjamvy/home/dundee
creating /home/dundee/workspace/benchmarksgame/bencher/tmp/jsonbench/tmp/tmpsjkjamvy/home/dundee/workspace
creating /home/dundee/workspace/benchmarksgame/bencher/tmp/jsonbench/tmp/tmpsjkjamvy/home/dundee/workspace/benchmarksgame
creating /home/dundee/workspace/benchmarksgame/bencher/tmp/jsonbench/tmp/tmpsjkjamvy/home/dundee/workspace/benchmarksgame/bencher
creating /home/dundee/workspace/benchmarksgame/bencher/tmp/jsonbench/tmp/tmpsjkjamvy/home/dundee/workspace/benchmarksgame/bencher/tmp
creating /home/dundee/workspace/benchmarksgame/bencher/tmp/jsonbench/tmp/tmpsjkjamvy/home/dundee/workspace/benchmarksgame/bencher/tmp/jsonbench
creating /home/dundee/workspace/benchmarksgame/bencher/tmp/jsonbench/tmp/tmpsjkjamvy/home/dundee/workspace/benchmarksgame/bencher/tmp/jsonbench/tmp
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fstack-protector-strong -fno-plt -flto=4 -fuse-linker-plugin -ffat-lto-objects -flto-partition=none -march=x86-64 -mtune=generic -O3 -pipe -fstack-protector-strong -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fstack-protector-strong -fno-plt -fPIC -I/usr/include/python3.7m -c /home/dundee/workspace/benchmarksgame/bencher/tmp/jsonbench/tmp/jsonbench.c -o /home/dundee/workspace/benchmarksgame/bencher/tmp/jsonbench/tmp/tmpsjkjamvy/home/dundee/workspace/benchmarksgame/bencher/tmp/jsonbench/tmp/jsonbench.o
gcc -pthread -shared -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -flto=4 -fuse-linker-plugin -ffat-lto-objects -flto-partition=none -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now /home/dundee/workspace/benchmarksgame/bencher/tmp/jsonbench/tmp/tmpsjkjamvy/home/dundee/workspace/benchmarksgame/bencher/tmp/jsonbench/tmp/jsonbench.o -L/usr/lib -lpython3.7m -o /home/dundee/workspace/benchmarksgame/bencher/tmp/jsonbench/tmp/jsonbench.cpython-37m-x86_64-linux-gnu.so
make[1]: Opouští se adresář „/home/dundee/workspace/benchmarksgame/bencher/tmp/jsonbench/tmp“
1.67s to complete and log all make actions

COMMAND LINE:
/usr/bin/python3 -c "import jsonbench" 1

PROGRAM OUTPUT:
OK

Revised BSD license

  Home   Conclusions   License   Play