youtube / spitfire

A high-performance Python template language
BSD 3-Clause "New" or "Revised" License
405 stars 58 forks source link

Add Django and Mako comparisons to render benchmark #56

Closed nicksay closed 8 years ago

nicksay commented 8 years ago

Example output:

$ python tests/benchmarks/render_benchmark.py  --compare --number 1000
Running benchmarks 1000 times each...

Cheetah template                               18.76 ms
Django template                               263.94 ms
Django template autoescaped                   262.89 ms
Jinja2 template                                 8.52 ms
Jinja2 template autoescaped                    18.22 ms
Mako template                                   3.25 ms
Mako template autoescaped                      11.45 ms
Python string template                         29.78 ms
Python StringIO buffer                         20.92 ms
Python cStringIO buffer                         5.93 ms
Python list concatenation                       2.30 ms
Spitfire template                              11.44 ms
Spitfire template -O1                           9.89 ms
Spitfire template -O2                           7.11 ms
Spitfire template -O3                           6.60 ms
Spitfire template baked                        13.54 ms
Spitfire template baked -O1                     8.60 ms
Spitfire template baked -O2                     8.46 ms
Spitfire template baked -O3                     8.15 ms
Spitfire template unfiltered                    6.36 ms
Spitfire template unfiltered -O1                2.76 ms
Spitfire template unfiltered -O2                2.77 ms
Spitfire template unfiltered -O3                2.17 ms
awbraunstein commented 8 years ago

Wow. Django is slowww. lgtm!