mustache.js

JavaScript performance comparison

Revision 5 of this test case created

Info

Tracking mustache.js performance.

Preparation code

<script src="https://raw.github.com/janl/mustache.js/90cc5f0d185282b9bc08e7be7a134606d36ada3f/mustache.js"></script>
<script>Mustache042 = Mustache;</script>

<script src="https://raw.github.com/janl/mustache.js/6d1954cb5c125c40548c9952efe79a4534c6760a/mustache.js"></script>
<script>Mustache052 = Mustache;</script>

<script src="https://raw.github.com/janl/mustache.js/f5d18caee285aeba3e46563fafc2d74684f569d5/mustache.js"></script>
<script>Mustache060 = Mustache;</script>
 
<script>
Benchmark.prototype.setup = function() {
    var template = "Hello {{name}}\nYou have just won ${{value}}!\n{{#in_ca}}\nWell, ${{ taxed_value }}, after taxes.\n{{/in_ca}}\n";
   
    var view = {
      name: "Chris",
      value: 10000,
      taxed_value: function() {
        return this.value - (this.value * 0.4);
      },
      in_ca: true
    };
};
</script>

Preparation code output

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
v0.4.2
Mustache042.to_html(template, view);
pending…
v0.5.2
Mustache052.render(template, view);
pending…
v0.6.0
Mustache060.render(template, view);
pending…

Compare results of other browsers

Revisions

You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page:

0 comments

Add a comment