Skip to content

6.0.0

Compare
Choose a tag to compare
@k0kubun k0kubun released this
· 8 commits to main since this release
3a6f147

Haml 6 became 1.7x faster than Haml 5, and it's now faster than Slim and Erubi in this benchmark that was originally written by Slim developers.

$ bundle exec ruby benchmark/slim/run-benchmarks.rb
Calculating -------------------------------------
       erubi v1.11.0    34.595k i/100ms
         slim v4.1.0    30.931k i/100ms
  haml v6.0.0.beta.1    35.621k i/100ms
-------------------------------------------------
       erubi v1.11.0    411.827k (± 0.4%) i/s -      2.076M
         slim v4.1.0    361.660k (± 0.4%) i/s -      1.825M
  haml v6.0.0.beta.1    427.207k (± 0.6%) i/s -      2.137M

Comparison:
  haml v6.0.0.beta.1:   427206.9 i/s
       erubi v1.11.0:   411826.6 i/s - 1.04x slower
         slim v4.1.0:   361659.8 i/s - 1.18x slower

Changes

  • Replace the implementation with Hamlit
    • The parser is kept as is, but everything else is replaced.
    • All Haml helpers except for preserve are removed.
    • Some legacy Rails integration is removed.