EJS vs Handlebars vs MTE (v3)

Revision 3 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"
    };
    
    var EJStemplate = new EJS({
      text: $("testEJS").innerHTML
    });
    
    var handlebarstemplate = Handlebars.compile($("testHandlebars").innerHTML);
    
    var templateMTE = new MTEEngine.Markup().fromElement('testMTE');

Test runner

Ready to run.

Testing in
TestOps/sec
EJS
EJStemplate.render(data);
ready
Handlebars
handlebarstemplate(data);
ready
MTE
templateMTE.render(data)
ready

Revisions

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