Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
mustache@4.2.0 vs handlebars@4.7.8
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36
Browser:
Chrome 128
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
Handlebars
200307.1 Ops/sec
Mustache
338529.0 Ops/sec
HTML Preparation code:
<script src="https://s3.amazonaws.com/builds.handlebarsjs.com/handlebars.min-v4.7.8.js"></script> <script src="https://unpkg.com/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 }; var handlebarsRenderer = Handlebars.compile(template); Mustache.parse(template);
Tests:
Handlebars
handlebarsRenderer(context);
Mustache
Mustache.render(template, context);