Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Get html, innerHTML vs $.html -- _ vs {}
(version: 0)
Comparing performance of:
Jquery + underscore vs Jquery + handlebars vs vanilla + underscore vs vanilla + handlebars
Created:
5 years ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.4.1/underscore-min.js"></script> <script src="https://cdn.jsdelivr.net/npm/handlebars@latest/dist/handlebars.js"></script> <script type="text/template" id="template-underscore"> Hello <%-obj.name%> </script> <script id="template-handlebars" type="text/x-handlebars-template"> Hello {{name}} </script>
Tests:
Jquery + underscore
_.template($('#template-underscore').html(), {name: 'hello'});
Jquery + handlebars
Handlebars.compile($('#template-handlebars').html())({name: 'hello'});
vanilla + underscore
_.template(document.getElementById('template-underscore').innerHTML, {name: 'hello'});
vanilla + handlebars
Handlebars.compile(document.getElementById('template-handlebars').innerHTML)({name: 'hello'});
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (4)
Previous results
Fork
Test case name
Result
Jquery + underscore
Jquery + handlebars
vanilla + underscore
vanilla + handlebars
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:
Get html, innerHTML vs $.html--
Equals vs underscore vs lodash
Equals vs underscore vs lodash part 2
Mustache410 VS Handlebars477
Comments
Confirm delete:
Do you really want to delete benchmark?