Mustache Implementations

Benchmark created by Isaac on


Description

Quick test of interpolation performance of some different mustache template implementations.

Preparation HTML

<script src="http://pvande.net/Milk/milk.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/mustache.js/0.3.0/mustache.min.js"></script>

Setup

var template = "Beef ribs {{name}} ball tip short ribs andouille, rump {{int}} ribeye pork. {{bool}} Pancetta ball tip pork belly short loin. {{name}} Tri-tip pork belly {{int}} shankle short ribs, {{email}} turducken short loin corned beef drumstick bresaola venison pork chop. Sirloin swine shank, spare ribs capicola pig cow tail andouille jowl. Swine shankle tail, meatball pork loin bacon jowl {{name}} sirloin ball tip rump prosciutto ribeye capicola hamburger. {{test}} Pork loin pig strip steak tail andouille, pancetta brisket shank bresaola sausage short loin. Tongue corned beef sausage andouille brisket. Shankle jerky pancetta chuck meatball, pork tail. Boudin ribeye spare ribs short ribs tenderloin. Flank jerky leberkäse biltong bresaola turducken. Tail shoulder capicola, biltong rump kielbasa shank tongue boudin pork loin sausage chuck andouille. Beef spare ribs pork loin chuck, {{email}} filet mignon prosciutto bresaola leberkäse salami short ribs sausage meatloaf pork belly flank. Jowl leberkäse meatloaf, ribeye pancetta tenderloin {{name}} venison spare ribs ball tip biltong andouille beef. Jowl ground {{test}} round bresaola, hamburger jerky swine frankfurter pork belly short loin pork loin.";
    var variables = {
       name: 'Isaac'
     , email: 'email@bogus.nodomain'
     , test: 'hello'
     , int: 42 
     , bool: false 
    };

Test runner

Ready to run.

Testing in
TestOps/sec
Mustache.js
Mustache.to_html(template, variables);
ready
Milk.coffee
Milk.render(template, variables);
ready

Revisions

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