Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
mustache vs handlebars rendering performance
nya nya nya
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Browser:
Chrome 131
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
Handlebars
442462.7 Ops/sec
Mustache
698881.4 Ops/sec
HTML Preparation code:
<script src="https://cdn.jsdelivr.net/npm/handlebars@4.7.7/dist/handlebars.js"></script> <script src="https://cdn.jsdelivr.net/npm/mustache@4.2.0/mustache.min.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 }; Mustache.parse(template); var handlebarsRenderer = Handlebars.compile(template);
Tests:
Handlebars
handlebarsRenderer(context);
Mustache
Mustache.render(template, context);