# clojure-template-benchmarks I decided to do some decent Clojure templating benchmarks: Test results are avg / standard deviation. ## Data Units are in microseconds (us)
Template Engine Simple Data Injection Small List (50 items) Big List (1000 items)
str 0.165 us / 0.016 us 14 us / 0.253 us 273 us / 14 us
hiccup 20 us / 0.367 us 1100 us / 59 us 24,000 us / 2900 us
hiccup (type-hinted) 0.335 us / 0.013 us 25 us / 0.431 us 498 us / 6.2 us
clabango (string) 329 us / 5.7 us 1800 us / 146 us 20,600 us / 799 us
clabango (files) 478 us / 42 us 1,790 us / 52 us 19,900 us / 573 us
stencil (string) 58 us / 6 us 212 us / 27 us 930 us / 37 us
stencil (file) 1.2 us / 0.022 us 38 us / 0.943 us 784 us / 16 us
tinsel 23.7 us / 5.5 us 1,100 us / 52 us 22,000 us / 770 us
laser 73.6 us / 1.5 us 243 us / 18 us 3,400 us / 61 us
enlive 38 us / 0.435 us 320 us / 10 us 6,400 us / 450 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. + Enlive and Laser are faster than Hiccup and Clabango Copyright © 2013 bitemyapp