1
0
Fork 0
template_engine_comparison/README.md

65 lines
2.7 KiB
Markdown
Raw Normal View History

2013-12-13 06:42:27 +00:00
# Template Engine Comparison
## Running
2013-12-13 18:43:03 +00:00
```bash
# Prepare workspace
2013-12-13 06:42:27 +00:00
git clone git@github.com:localhots/template_engine_comparison.git
cd template_engine_comparison
bundle install
2013-12-13 18:43:03 +00:00
# Generate data for templates
2013-12-13 19:40:54 +00:00
./fakedata.rb 1000 > data/big.yml
2013-12-13 18:43:03 +00:00
# Run benchmarks
2013-12-13 06:42:27 +00:00
./benchmark.rb
```
## Current Results
2013-12-13 20:04:31 +00:00
** Intel Core i7 2.6 GHz **
2013-12-13 06:42:27 +00:00
```
############################################################
2013-12-13 19:40:54 +00:00
## Compilation (small) (1000 runs) ##
2013-12-13 06:42:27 +00:00
############################################################
user system total real
2013-12-13 20:04:31 +00:00
string 0.040000 0.010000 0.050000 ( 0.054310)
erb 0.240000 0.030000 0.270000 ( 0.260111)
erubis 0.060000 0.010000 0.070000 ( 0.078122)
haml 0.850000 0.030000 0.880000 ( 0.873031)
slim 1.930000 0.030000 1.960000 ( 1.960224)
liquid 0.050000 0.020000 0.070000 ( 0.073867)
2013-12-13 06:42:27 +00:00
############################################################
2013-12-13 19:40:54 +00:00
## Render (small) (1000 runs) ##
2013-12-13 06:42:27 +00:00
############################################################
user system total real
2013-12-13 20:04:31 +00:00
string 0.010000 0.000000 0.010000 ( 0.013322)
erb 0.010000 0.000000 0.010000 ( 0.012137)
erubis 0.010000 0.000000 0.010000 ( 0.008176)
haml 0.020000 0.000000 0.020000 ( 0.021298)
slim 0.020000 0.000000 0.020000 ( 0.022210)
liquid 0.030000 0.000000 0.030000 ( 0.036494)
2013-12-13 19:40:54 +00:00
############################################################
## Compilation (big) (1000 runs) ##
############################################################
user system total real
2013-12-13 20:04:31 +00:00
string 0.060000 0.020000 0.080000 ( 0.071830)
erb 0.300000 0.020000 0.320000 ( 0.324309)
erubis 0.120000 0.020000 0.140000 ( 0.140036)
haml 1.180000 0.030000 1.210000 ( 1.203810)
slim 2.410000 0.030000 2.440000 ( 2.441857)
liquid 0.120000 0.010000 0.130000 ( 0.134647)
2013-12-13 19:40:54 +00:00
############################################################
2013-12-13 20:04:31 +00:00
## Render (big) (100 runs) ##
2013-12-13 19:40:54 +00:00
############################################################
user system total real
2013-12-13 20:04:31 +00:00
string 0.390000 0.030000 0.420000 ( 0.414645)
erb 0.650000 0.020000 0.670000 ( 0.666250)
erubis 0.430000 0.010000 0.440000 ( 0.448594)
haml 0.970000 0.020000 0.990000 ( 0.981991)
slim 1.400000 0.010000 1.410000 ( 1.408893)
liquid 10.480000 0.050000 10.530000 ( 10.535895)
2013-12-13 06:42:27 +00:00
```