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

 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
12.882.8810,716367  3% 1% 100% 0% 0% 0% 0% 1%

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.


 iobench Nuitka program source code

import os, time

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

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

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

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

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

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

 Wed, 19 Jan 2022 22:34:53 GMT

make[1]: Vstupuje se do adresáře „/home/dundee/work/pybenchmarks/bencher/tmp/iobench/tmp“
nuitka3 --remove-output iobench.nuitka
Nuitka-Options:INFO: Used command line options: --remove-output iobench.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 '' on Python '3.10' commercial None.
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:WARNING: You are not using ccache.
Nuitka:INFO: Removing build directory ''.
Nuitka:INFO: Successfully created 'iobench.nuitka.bin'.
cp iobench.nuitka.bin iobench.nuitka_run
make[1]: Opouští se adresář „/home/dundee/work/pybenchmarks/bencher/tmp/iobench/tmp“
14.24s to complete and log all make actions

 ./iobench.nuitka_run 1

<compiled_function fread at 0x7fa3e3a0b4c0> 100 bytes, 0.34us per write
<compiled_function fwrite at 0x7fa3e3a0b100> 100 bytes, 0.29us per write
<compiled_function fread at 0x7fa3e3a0b4c0> 1000 bytes, 0.44us per write
<compiled_function fwrite at 0x7fa3e3a0b100> 1000 bytes, 0.36us per write
<compiled_function fread at 0x7fa3e3a0b4c0> 10000 bytes, 0.80us per write
<compiled_function fwrite at 0x7fa3e3a0b100> 10000 bytes, 0.42us per write
<compiled_function file_read at 0x7fa3e3a0b6a0> 100 bytes, 0.14us per write
<compiled_function file_write at 0x7fa3e3a0b5b0> 100 bytes, 0.11us per write
<compiled_function file_read at 0x7fa3e3a0b6a0> 1000 bytes, 0.46us per write
<compiled_function file_write at 0x7fa3e3a0b5b0> 1000 bytes, 0.24us per write
<compiled_function file_read at 0x7fa3e3a0b6a0> 10000 bytes, 2.65us per write
<compiled_function file_write at 0x7fa3e3a0b5b0> 10000 bytes, 0.77us per write

Revised BSD license

  Home   Conclusions   License   Play