Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
mustache rendering performance - parsed vs unparsed
(version: 0)
nya nya nya
Comparing performance of:
Mustache Unparsed vs Mustache Parsed
Created:
6 years ago
by:
Guest
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 templateParsed = "<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 templateUnparsed = "<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(templateParsed);
Tests:
Mustache Unparsed
Mustache.render(templateUnparsed, context);
Mustache Parsed
Mustache.render(templateParsed, context);
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Mustache Unparsed
Mustache Parsed
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:
Imperative DOM vs innerHTML vs <template>
TEMPLATE1
Template String vs Template Function
Template Literal vs Tagged Template Literal
mustache@4.2.0 vs handlebars@4.7.8
Comments
Confirm delete:
Do you really want to delete benchmark?