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

 performance measurements

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

 N  CPU secs Elapsed secs Memory KB Code B ≈ CPU Load

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

Read  benchmark to see what this program should do.

 notes

  source code

import sys
from jinja2 import Template

templ = """

"""


class User(object):
    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 xrange(n):
        res = render_template(i)

    print res

main()

 make, command-line, and program output logs

 Fri, 30 Oct 2020 20:47:00 GMT

COMMAND LINE:
 /usr/bin/jython templates.jython 1000

PROGRAM FAILED 


PROGRAM OUTPUT:

Traceback (most recent call last):
  File "templates.jython", line 3, in <module>
    from jinja2 import Template
  File "/opt/jython/Lib/site-packages/jinja2/__init__.py", line 6, in <module>
    from markupsafe import escape
IOError: [Errno 2] File not found - /opt/jython/Lib/site-packages/markupsafe/__init__$py.class (Operace zamítnuta)

Revised BSD license

  Home   Conclusions   License   Play