almost 4 years ago

系統：

Mac OS X Yosemite 10.10.1
Ruby 2.1.5
Rails 4.1.8

相關連結

slim ( https://github.com/slim-template/slim )
slim-rails ( https://github.com/slim-template/slim-rails )
redcarpet ( https://github.com/vmg/redcarpet )

原因

• Slim allows you to write very minimal templates which are easy to maintain and pretty much guarantees that you write well-formed HTML and XML
• We also think that the Slim syntax is also aesthetic and makes it much more fun to write templates. Since you can use Slim as a drop-in replacement in all the major framework you can start easily.
• The Slim architecture is very flexible and allows you to write syntax extensions and plugins.

Yes, Slim is speedy! Slim was developed right from the start with performance in mind.
Benchmarks are done for every commit at http://travis-ci.org/slim-template/slim.
Don't trust the numbers? That's as it should be. Please try the benchmark rake task yourself!

However in our opionion you should use Slim because of its features and syntax. We just ensure that Slim doesn't have a negative impact on the performance of your application.