I've been meaning to write and run this benchmark for a while to see how things fare in the view world these days. Initially I did markaby vs tagz (my favorite at a svelte 244 lines). I then added builder out of curiosity's sake. Thanks to atmos I was able to get code and numbers for erubis and haml.
Builder is slightly faster than tagz, but not enough for me to want to switch to it. Tagz and markaby read so much better than builder, but markaby is so much slower (4.73 times slower than builder) that I can't justify its use.
Now if only I could get tagz working correctly with sinatra. :(
# iterations = 10000
#
# user system total real multiplier
#
# builder 1.910000 0.000000 1.910000 ( 1.918751) (1.00)
# tagz 2.310000 0.020000 2.330000 ( 2.357710) (1.23)
# haml 5.370000 0.020000 5.390000 ( 5.418876) (2.82)
# erubis 5.390000 0.020000 5.410000 ( 5.446929) (2.84)
# markaby 8.980000 0.030000 9.010000 ( 9.078748) (4.73)
Code behind the cut...
