Permalink
Fetching contributors…
Cannot retrieve contributors at this time
74 lines (67 sloc) 3.99 KB
10000 Iterations
Rehearsal ---------------------------------------------------
(1) erb 7.390000 0.020000 7.410000 ( 7.401043)
(1) erubis 6.550000 0.020000 6.570000 ( 6.548220)
(1) fast erubis 6.580000 0.010000 6.590000 ( 6.580802)
(1) slim 74.940000 1.310000 76.250000 ( 76.224066)
(1) haml 53.880000 0.190000 54.070000 ( 54.013370)
(1) haml ugly 52.300000 0.130000 52.430000 ( 52.382605)
(1) mote 3.980000 0.010000 3.990000 ( 3.997437)
(2) erb 2.600000 0.010000 2.610000 ( 2.610422)
(2) erubis 2.110000 0.010000 2.120000 ( 2.116072)
(2) fast erubis 1.850000 0.010000 1.860000 ( 1.856715)
(2) slim 0.440000 0.000000 0.440000 ( 0.443441)
(2) haml 5.690000 0.020000 5.710000 ( 5.703915)
(2) haml ugly 4.820000 0.010000 4.830000 ( 4.822919)
(3) erb 0.220000 0.000000 0.220000 ( 0.216615)
(3) erubis 0.150000 0.000000 0.150000 ( 0.155099)
(3) fast erubis 0.170000 0.000000 0.170000 ( 0.173793)
(3) slim 0.280000 0.000000 0.280000 ( 0.277266)
(3) haml 1.960000 0.000000 1.960000 ( 1.964113)
(3) haml ugly 1.750000 0.010000 1.760000 ( 1.755428)
(3) mote 0.190000 0.000000 0.190000 ( 0.182972)
(4) erb 0.370000 0.000000 0.370000 ( 0.374933)
(4) erubis 0.300000 0.010000 0.310000 ( 0.302143)
(4) slim 0.440000 0.000000 0.440000 ( 0.441432)
(4) haml 2.250000 0.010000 2.260000 ( 2.257492)
(4) haml ugly 2.030000 0.000000 2.030000 ( 2.039379)
---------------------------------------- total: 235.020000sec
user system total real
(1) erb 7.490000 0.030000 7.520000 ( 7.515455)
(1) erubis 6.660000 0.020000 6.680000 ( 6.705458)
(1) fast erubis 6.620000 0.030000 6.650000 ( 6.640770)
(1) slim 76.120000 1.370000 77.490000 ( 77.566966)
(1) haml 54.210000 0.180000 54.390000 ( 54.327318)
(1) haml ugly 52.880000 0.190000 53.070000 ( 53.100166)
(1) mote 4.020000 0.020000 4.040000 ( 4.050001)
(2) erb 2.640000 0.010000 2.650000 ( 2.637621)
(2) erubis 2.150000 0.000000 2.150000 ( 2.156230)
(2) fast erubis 1.870000 0.010000 1.880000 ( 1.868677)
(2) slim 0.440000 0.000000 0.440000 ( 0.434685)
(2) haml 5.720000 0.010000 5.730000 ( 5.727416)
(2) haml ugly 4.860000 0.010000 4.870000 ( 4.867901)
(3) erb 0.220000 0.000000 0.220000 ( 0.213323)
(3) erubis 0.150000 0.000000 0.150000 ( 0.154849)
(3) fast erubis 0.170000 0.000000 0.170000 ( 0.175587)
(3) slim 0.280000 0.000000 0.280000 ( 0.284466)
(3) haml 1.980000 0.010000 1.990000 ( 1.981789)
(3) haml ugly 1.760000 0.010000 1.770000 ( 1.764523)
(3) mote 0.180000 0.000000 0.180000 ( 0.179639)
(4) erb 0.360000 0.000000 0.360000 ( 0.361989)
(4) erubis 0.290000 0.000000 0.290000 ( 0.296176)
(4) slim 0.430000 0.000000 0.430000 ( 0.435104)
(4) haml 2.250000 0.000000 2.250000 ( 2.253505)
(4) haml ugly 2.020000 0.010000 2.030000 ( 2.021259)
1. Uncached benchmark. Template is parsed every time.
Activate this benchmark with slow=1.
2. Cached benchmark. Template is parsed before the benchmark.
The ruby code generated by the template engine might be evaluated every time.
This benchmark uses the standard API of the template engine.
3. Compiled benchmark. Template is parsed before the benchmark and
generated ruby code is compiled into a method.
This is the fastest evaluation strategy because it benchmarks
pure execution speed of the generated ruby code.
4. Compiled Tilt benchmark. Template is compiled with Tilt, which gives a more
accurate result of the performance in production mode in frameworks like
Sinatra, Ramaze and Camping. (Rails still uses its own template
compilation.)