performance measurements

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

 N  CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
14.964.969,780367  6% 1% 2% 100%
15.105.109,796367  7% 1% 100% 1%
15.145.149,580367  6% 2% 100% 2%

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

Read iobench benchmark to see what this program should do.

 notes

 iobench Nuitka program source code

import os, time

def measure(func, repetitions, size):
    t0 = time.time()
    func(repetitions, size)
    print(
        func,
        "%d bytes, %.2fus per write" % (
            size,
            (time.time() - t0) / repetitions * 1000 * 1000
        )
    )

def fwrite(repetitions, size):
    fd = os.open("/dev/null", os.O_WRONLY)
    for i in range(repetitions):
        os.write(fd, b" " * size)

def fread(repetitions, size):
    fd = os.open("/dev/full", os.O_RDONLY)
    for i in range(repetitions):
        os.read(fd, size)

def file_write(repetitions, size):
    f = open("/dev/null", "w")
    for i in range(repetitions):
        f.write(" " * size)
    f.flush()

def file_read(repetitions, size):
    f = open("/dev/full")
    for i in range(repetitions):
        f.read(size)

if __name__ == '__main__':
    measure(fread, 1000000, 100)
    measure(fwrite, 1000000, 100)
    measure(fread, 1000000, 1000)
    measure(fwrite, 1000000, 1000)
    measure(fread, 100000, 10000)
    measure(fwrite, 100000, 10000)
    measure(file_read, 1000000, 100)
    measure(file_write, 1000000, 100)
    measure(file_read, 1000000, 1000)
    measure(file_write, 1000000, 1000)
    measure(file_read, 100000, 10000)
    measure(file_write, 100000, 10000)

 make, command-line, and program output logs

Thu, 21 Feb 2019 10:11:24 GMT

MAKE:
make[1]: Vstupuje se do adresáře „/home/dundee/workspace/benchmarksgame/bencher/tmp/iobench/tmp“
nuitka3 --remove-output iobench.nuitka
cp iobench.nuitka.bin iobench.nuitka_run
make[1]: Opouští se adresář „/home/dundee/workspace/benchmarksgame/bencher/tmp/iobench/tmp“
3.38s to complete and log all make actions

COMMAND LINE:
./iobench.nuitka_run 1

PROGRAM OUTPUT NOT CHECKED:
<compiled_function fread at 0x7fbd93dfb668> 100 bytes, 0.59us per write
<compiled_function fwrite at 0x7fbd93dfb9e8> 100 bytes, 0.59us per write
<compiled_function fread at 0x7fbd93dfb668> 1000 bytes, 0.71us per write
<compiled_function fwrite at 0x7fbd93dfb9e8> 1000 bytes, 0.65us per write
<compiled_function fread at 0x7fbd93dfb668> 10000 bytes, 1.48us per write
<compiled_function fwrite at 0x7fbd93dfb9e8> 10000 bytes, 0.75us per write
<compiled_function file_read at 0x7fbd93dfb588> 100 bytes, 0.21us per write
<compiled_function file_write at 0x7fbd93dfb748> 100 bytes, 0.20us per write
<compiled_function file_read at 0x7fbd93dfb588> 1000 bytes, 0.73us per write
<compiled_function file_write at 0x7fbd93dfb748> 1000 bytes, 0.44us per write
<compiled_function file_read at 0x7fbd93dfb588> 10000 bytes, 4.29us per write
<compiled_function file_write at 0x7fbd93dfb748> 10000 bytes, 1.51us per write

Revised BSD license

  Home   Conclusions   License   Play