Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
mustache rendering performance 4
nya nya nya
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36
Browser:
Chrome 123
Operating system:
Linux
Device Platform:
Desktop
Date tested:
2 years ago
Test name
Executions per second
Handlebars
164920.2 Ops/sec
Hogan
828921.7 Ops/sec
Mustache
406168.1 Ops/sec
HTML Preparation code:
<script src="https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/4.7.6/handlebars.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/hogan.js/3.0.2/hogan.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/mustache.js/4.1.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); var hoganRenderer = Hogan.compile(template); Mustache.parse(template);
Tests:
Handlebars
handlebarsRenderer(context);
Hogan
hoganRenderer.render(context);
Mustache
Mustache.render(template, context);