I took some time to implement mustache rendering engine as I saw fit. It does not use any metaprogramming at all, any complex template analisis, and I believe the code is much simpler and easier to follow. I cover all features mentioned at http://mustache.github.io/mustache.5.html except
Everything else is probably covered and is from 15 to 30 times faster than current mustache/mustache repository.
For now it covers the
Beard.render(template, data)
API, where data is a hash or Beard::View object.
You can find the benchmarks at https://github.com/KillaPL/beard_vs_mustache and run them yourselves.
You can find the code at https://github.com/KillaPL/beard.
I would be happy if you guys could take a look and let me know if you'd be interested in merging this solution into canonical mustache (after it's polished and prepared, of course).
{{# first_set }}{{> article }}{{/ first_set }} {{> ad }} {{# second_set }}{{ > article }}{{/ second_set }}
{{=<% %>=}}
<div id="<% renderwithmustache %>" ng-click="{{ letangularrender }}">