- Static data as of April 13, 2015, some updates as of October 1, 2015
# | Metric | Haml | Slim | Winner |
---|---|---|---|---|
1 | Issues | Slim | ||
2 | Stars | Slim | ||
3 | Quality | -- | Haml | |
4 | Test Coverage | -- | Haml | |
5 | Documentation | Slim | ||
6 | Watchers | 95 | 112 | Slim |
7 | Forks | 440 | 306 | Haml |
8 | Pull Requests | 11 | 1 | Slim |
9 | Activity | 1 commmit / Month | 6 commits / Month | Slim |
10 | Community | 1 author / Month | 4 authors / Month | Slim |
11 | Raw HTML Compat | No | Yes | Slim |
12 | Rails Streaming Compat | No, and issue was closed in 2020 | Yes | Slim |
13 | Speed* | 1.09x slower than ERB | 1.12x slower than ERB | - |
The Haml issue has open since Sep 23, 2011, was bumped from 4.0 release, to 5.0 release, now to 6.0 release, with no end in sight, and people openly quesitoning if it is even possible. Haml has a notoriously difficult codebase.
Conventional wisdom was that Haml is slow, Slim is fast. However haml was rewritten to use hamlit based on a better parser and compiler optimizations (Ripper and Temple). Now haml is as fast as, or faster than slim. They are now roughly equivalent in speed, meaning speed is no longer a deciding factor between them.
In February 2024 the various libraries tested in this benchmark are nearly identical in a basic performance test. Of course, YMMV depending on which features you use, and how much.
Test was run on a 16GB 13" M2 MacBook Pro running MacOS Sonoma 14.3.1.
Performance is no longer the reason to choose Slim!