# clojure-template-benchmarks I decided to do some decent Clojure templating benchmarks: Test results are avg / standard deviation. ## Data
Template Engine Simple Data Injection Small List (50 items) Big List (1000 items)
str 165 ns / 16 ns 14 us / 253 ns 273 us / 14 us
hiccup 20 us / 367 ns 1.1 ms / 59 us 24 ms / 2.9 ms
clabango (string) 329 us / 5.7 us 1.8 ms / 146 us 20.6 us / 799 us
clabango (files) 478 us / 42 us 1.79 ms / 52 us 19.9 ms / 573 us
stencil (string) 58 us / 6 us 212 us / 27 us 930 us / 37 us
stencil (file) 1.2 us / 22 us 38 us / 943 ns 784 us / 16 us
## Conclusions + str is really fast and a huge waste of programmer time. + clabango from filesystem templates or string literals are equivalent + clabango and hiccup are equivalent in performance + stencil from string literals is faster than clabango and hiccup, + stencil from files is even faster by a marginal amount. Copyright © 2013 bitemyapp