Closed konung closed 5 years ago
Thanks for reporting the information.
First, the benchmark is run with ruby 2.6 everyday on Travis, and the result is https://travis-ci.org/k0kubun/hamlit/jobs/536142677:
Comparison:
hamlit v2.9.3: 191888.2 i/s
erubi v1.8.0: 191440.1 i/s - 1.00x slower
slim v4.0.1: 186977.8 i/s - 1.03x slower
faml v0.8.1: 147069.5 i/s - 1.30x slower
haml v5.1.0: 101107.0 i/s - 1.90x slower
I'm totally fine to regularly update these numbers but I don't think it has a significant difference from README right now. I don't think difference between Haml 5.0 and 5.1 has a significant impact on the generate code's performance either. Note that this benchmark is slightly naive for measurement noises.
Second, measuring the meaningful performance numbers with --jit is not that straight-forward. Your benchmark results with --jit would be mostly measuring overhead for having MJIT worker thread and a background compiler process. As all of them are in the same process, it could be even compiling another template engine's code while running a benchmark. The overhead itself is one problem of MJIT to be solved, but the numbers coming from it does not reflect the actual performance difference of native code generated by JIT. I'd need to modify the benchmark code for getting the meaningful results with --jit.
As I believe the current results are not that outdated, I'll consider doing those update stuffs when we publish Ruby 2.7. Thank you.
@k0kubun Thank you for a great gem.
Just FYI all major templating engines have had noticeable performance improvements ( of most relevance is an update to HAML 5.1 release a couple of days ago. ). And the benchmark on the front page is a bit old.
Hamlit still dominates thou, even surpassing erubi.
Here is my benchmark using 3 versions of Ruby && also trying out --jit with Ruby 2.7.0-dev