EJS vs Handlebars vs MTE (v2)

Revision 2 of this benchmark created on


Preparation HTML

<script src="//ajax.googleapis.com/ajax/libs/mootools/1.3/mootools-yui-compressed.js"></script>
<script src="//cloud.github.com/downloads/wycats/handlebars.js/handlebars-1.0.rc.1.js"></script>
<script src="//embeddedjavascript.googlecode.com/svn/trunk/src/ejs.js"></script>
<script src="//mte.null-tech.com/scripts/mte.js"></script>
<script src="//mte.null-tech.com/scripts/mte.observables.js"></script>
<script src="//mte.null-tech.com/scripts/mte.markup.js"></script>

<script id="testEJS" type="text/ejs">
  <h1><%= title %></h1>
</script>
<script id="testHandlebars" type="text/x-handlebars-template">
  <h1>{{title}}</h1>
</script>
<script id="testMTE" type="text/mte">
  <h1 data-bind="title"></h1>
</script>

Setup

var data = {
      title: "Test title"
    };

Test runner

Ready to run.

Testing in
TestOps/sec
EJS
new EJS({
  text: $("testEJS").innerHTML
}).render(data);
ready
Handlebars
var template = Handlebars.compile($("testHandlebars").innerHTML);
template(data);
ready
MTE
var templateMTE = new MTEEngine.Markup().fromElement('testMTE');
templateMTE.render(data)
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.