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
1,0001.191.2420,140322  2% 10% 2% 98%
1,0001.161.1620,088322  4% 6% 100% 1%
1,0001.181.1820,288322  8% 9% 100% 7%

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

Read templates benchmark to see what this program should do.

 notes

 templates Nuitka program source code

import sys
from jinja2 import Template

templ = """

"""


class User(object):
    __slots__ = ('user_id', 'username')

    def __init__(self, user_id, username):
        self.user_id = user_id
        self.username = username


def render_template(user_id):
    users = [
        User(user_id, 'SomeUsername')
    ]

    template = Template(templ)
    return template.render(users=users)


def main():
    n = int(sys.argv[1])

    for i in range(n):
        res = render_template(i)

    print(res)

main()

 make, command-line, and program output logs

Mon, 15 Oct 2018 13:04:42 GMT

MAKE:
make[1]: Vstupuje se do adresáře „/home/dundee/workspace/benchmarksgame/bencher/tmp/templates/tmp“
nuitka3 --remove-output templates.nuitka
Nuitka:WARNING:Not recursing to 'jinja2' (/usr/lib/python3.7/site-packages/jinja2), please specify --nofollow-imports (do not warn), --follow-imports (recurse to all), --nofollow-import-to=jinja2 (ignore it), --follow-import-to=jinja2 (recurse to it) to change.
cp templates.nuitka.bin templates.nuitka_run
make[1]: Opouští se adresář „/home/dundee/workspace/benchmarksgame/bencher/tmp/templates/tmp“
2.91s to complete and log all make actions

COMMAND LINE:
./templates.nuitka_run 1000

PROGRAM OUTPUT:

<ul>

  <li><a href="/user/999">SomeUsername</a></li>

</ul>

Revised BSD license

  Home   Conclusions   License   Play