Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
mustache rendering performance
(version: 3)
nya nya nya
Comparing performance of:
Handlebars vs Hogan vs Mustache vs Mote
Created:
9 years ago
by:
Registered User
Jump to the latest result
HTML Preparation code:
<script src="https://builds.handlebarsjs.com.s3.amazonaws.com/handlebars-v4.0.5.js"></script> <script src="https://twitter.github.io/hogan.js/builds/3.0.1/hogan-3.0.1.js"></script> <script src="https://rawgit.com/janl/mustache.js/v2.2.1/mustache.js"></script> <script src="https://rawgit.com/satchmorun/mote/master/mote.js"></script>
Script Preparation code:
var template = "<strong>This is a slightly more complicated {{thing}}.</strong>.\n{{! Just ignore this business. }}\nCheck this out:\n{{#hasThings}}\n<ul>\n{{#things}}\n<li class={{className}}>{{word}}</li>\n{{/things}}</ul>.\n{{/hasThings}}\n{{^hasThings}}\n\n<small>Nothing to check out...</small>\n{{/hasThings}}"; var context = { thing: function() { return "blah"; }, things: [ {"className": "one", word: "@fat"}, {"className": "two", word: "@dhg"}, {"className": "three", word:"@sayrer"} ], hasThings: true }; var handlebarsRenderer = Handlebars.compile(template); var hoganRenderer = Hogan.compile(template); Mustache.parse(template); var moteRenderer = mote.compile(template);
Tests:
Handlebars
handlebarsRenderer(context);
Hogan
hoganRenderer.render(context);
Mustache
Mustache.render(template, context);
Mote
moteRenderer(context);
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (4)
Previous results
Fork
Test case name
Result
Handlebars
Hogan
Mustache
Mote
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Related benchmarks:
mustache rendering performance test
mustache rendering performance-fix
mustache rendering performance 4
mustache rendering performance 3a
Comments
Confirm delete:
Do you really want to delete benchmark?