1
0
Fork 0
template_engine_comparison/README.md

2.4 KiB

Template Engine Comparison

Running

# Prepare workspace
git clone git@github.com:localhots/template_engine_comparison.git
cd template_engine_comparison
bundle install

# Generate data for templates
./fakedata.rb 1000 > data/big.yml

# Run benchmarks
./benchmark.rb

Current Results

############################################################
##            Compilation (small) (1000 runs)             ##
############################################################
                     user     system      total        real
erb              0.250000   0.030000   0.280000 (  0.275828)
erubis           0.060000   0.020000   0.080000 (  0.077510)
haml             0.860000   0.030000   0.890000 (  0.892039)
slim             1.960000   0.030000   1.990000 (  1.989972)
liquid           0.060000   0.020000   0.080000 (  0.074439)

############################################################
##               Render (small) (1000 runs)               ##
############################################################
                     user     system      total        real
erb              0.010000   0.000000   0.010000 (  0.012331)
erubis           0.010000   0.000000   0.010000 (  0.008456)
haml             0.020000   0.000000   0.020000 (  0.027852)
slim             0.030000   0.000000   0.030000 (  0.021398)
liquid           0.030000   0.000000   0.030000 (  0.037635)

############################################################
##             Compilation (big) (1000 runs)              ##
############################################################
                     user     system      total        real
erb              0.330000   0.020000   0.350000 (  0.352752)
erubis           0.120000   0.020000   0.140000 (  0.139981)
haml             1.200000   0.030000   1.230000 (  1.226896)
slim             2.440000   0.030000   2.470000 (  2.469225)
liquid           0.120000   0.020000   0.140000 (  0.133451)

############################################################
##                 Render (big) (100 runs)                ##
############################################################
                     user     system      total        real
erb              0.650000   0.020000   0.670000 (  0.667166)
erubis           0.430000   0.010000   0.440000 (  0.446348)
haml             0.970000   0.020000   0.990000 (  0.993755)
slim             1.440000   0.010000   1.450000 (  1.445460)
liquid          10.660000   0.050000  10.710000 ( 10.715820)