put-selector vs jquery.tmpl/mustachehtml
JavaScript performance comparison
Info
Comparing put-selector to jquery.tmpl and mustache HTML templating
Preparation code
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="//ajax.microsoft.com/ajax/jquery.templates/beta1/jquery.tmpl.js"></script>
<script src="//kzyp.dojotoolkit.org/packages/put-selector/put.js"></script>
<script src="//kzyp.dojotoolkit.org/packages/mustache/mustache.js"></script>
<script>
myTemplate = jQuery.template(null, '<div class="parent"><span class="name">${name}</span><span class="age">${age}</span></div>');
</script>
Preparation code output
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
mustache |
|
pending… |
jquery.tmpl |
|
pending… |
put-selector var sub |
|
pending… |
jquery.tmpl compiled |
|
pending… |
You can edit these tests or add even more tests to this page by appending /edit to the URL.
0 comments