youtube / spitfire

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

Add Python standard library comparisons to render benchmark #52

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...

Python string template                         28.56 ms
Python StringIO buffer                         19.99 ms
Python cStringIO buffer                         5.78 ms
Python list concatenation                       2.41 ms
Spitfire template                              12.67 ms
Spitfire template -O1                          11.34 ms
Spitfire template -O2                           7.67 ms
Spitfire template -O3                           7.29 ms
Spitfire template baked                        14.67 ms
Spitfire template baked -O1                     8.98 ms
Spitfire template baked -O2                     8.95 ms
Spitfire template baked -O3                     8.62 ms
Spitfire template unfiltered                    7.33 ms
Spitfire template unfiltered -O1                3.16 ms
Spitfire template unfiltered -O2                3.23 ms
Spitfire template unfiltered -O3                2.67 ms
awbraunstein commented 8 years ago

Can you include the output from the renderer benchmark in the pr comment?

lgtm otherwise.

nicksay commented 8 years ago

Done