Skip to content

Instantly share code, notes, and snippets.

@bacher09
Created August 12, 2014 10:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bacher09/4cec96a34447faa063fc to your computer and use it in GitHub Desktop.
Save bacher09/4cec96a34447faa063fc to your computer and use it in GitHub Desktop.
Realworldish Benchmark:
jinja 0.0009 seconds
mako 0.0008 seconds
django 0.0067 seconds
genshi 0.0144 seconds
(venv)slava@slava-air ~/src/jinja2/examples/rwbench $ python rwbench.py
Realworldish Benchmark:
jinja 0.0013 seconds
mako 0.0012 seconds
django 0.0066 seconds
genshi 0.0132 seconds
(venv)slava@slava-air ~/src/jinja2/examples/rwbench $ python rwbench.py
Realworldish Benchmark:
jinja 0.0010 seconds
mako 0.0009 seconds
django 0.0066 seconds
genshi 0.0134 seconds
================================================================================
Template Engine BigTable Benchmark
================================================================================
This benchmark compares some python templating engines with Jinja 2 so
that we get a picture of how fast Jinja 2 is for a semi real world
template. If a template engine is not installed the test is skipped.
--------------------------------------------------------------------------------
jinja 0.0045 seconds
mako 0.0054 seconds
tornado 0.0291 seconds
tenjin 0.0082 seconds
spitfire *not installed*
django 0.3679 seconds
genshi *not installed*
cheetah 0.0375 seconds
chameleon 0.0305 seconds
chameleon_genshi *not installed*
--------------------------------------------------------------------------------
WARNING: The results of this benchmark are useless to compare the
performance of template engines and should not be taken seriously in any
way. It's testing the performance of simple loops and has no real-world
usefulnes. It only used to check if changes on the Jinja code affect
performance in a good or bad way and how it roughly compares to others.
================================================================================
(venv)slava@slava-air ~/src/jinja2/examples $ python bench.py
================================================================================
Template Engine BigTable Benchmark
================================================================================
This benchmark compares some python templating engines with Jinja 2 so
that we get a picture of how fast Jinja 2 is for a semi real world
template. If a template engine is not installed the test is skipped.
--------------------------------------------------------------------------------
jinja 0.0048 seconds
mako 0.0053 seconds
tornado 0.0274 seconds
tenjin 0.0061 seconds
spitfire *not installed*
django 0.3325 seconds
genshi *not installed*
cheetah 0.0362 seconds
chameleon 0.0301 seconds
chameleon_genshi *not installed*
--------------------------------------------------------------------------------
WARNING: The results of this benchmark are useless to compare the
performance of template engines and should not be taken seriously in any
way. It's testing the performance of simple loops and has no real-world
usefulnes. It only used to check if changes on the Jinja code affect
performance in a good or bad way and how it roughly compares to others.
================================================================================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment