Interesting & solid 🙂
Slim and Haml are two popular template language for Ruby on Rails, and there are many debates on which one is better all over the internet.
Luckily there are some benchmark tools on GitHub which may help to make a final decision.
I just pick up one from the official Slim GitHub repository: https://github.com/slim-template/slim
How-to Run Benchmark Test
Step 1: clone the code
Step 2: install haml and slim for your rubies
On this post is written the slim version is 2.0.2 and haml version is 4.0.5.
Step 3: run the benchmark and review the generated report
My Customized Benchmark Test
Default iteration is 1000, which makes the difference too small, so I update it to 100,000 in run-benchmarks.rb
Then I run 9 rounds of test under this configuration matrix:
|Ruby 1.9.3||Ruby 2.0.0||Ruby 2.1.1|
View original post 562 more words