JavaScript template language shootoff

JavaScript performance comparison

Revision 776 of this test case created by amrutha

Info

A limited comparison of some popular JavaScript templating engines on a short template: 6 header tags, and 10 list items. Compared templating engines:

Understanding Kendo UI Template Performance

It's not magic. Through careful performance testing, we have found that string concatenation (+=) outside of a "with" block is significantly faster than JavaScript array push/join operations in a "with" block. This helps Kendo UI Templates run as fast as possible. Additional optimizations are coming soon to make performance in a "with" block better, too.

More on Kendo UI Templates

Note: When adding a new test, please ensure that your test returns the same HTML string (or equivalent DOM fragment) as the others.

[Updated July 2012 to included latest versions of libraries]

Preparation code

<script src="http://cdn.kendostatic.com/2012.2.621/js/kendo.all.min.js"></script>
<a id="unobtrusive" href="javascript:void(0)" >Unobtrusive</a>
<a id="obtrusivenotkendo" onclick="fired()" href="javascript:void(0)">Unobtrusive</a>
<a id="obtrusive" href="javascript:void(0)" data-click="fired()">Obtrusive</a>
<script>
var unob= document.getElementById('unobtrusive');
var ob= document.getElementById('obtrusive');
var obntkendo=document.getElementById('obtrusivenotkendo');
$('#unobtrusive').click(fired());
function fired(){
   alert('fired.')
}
</script>

Preparation code output

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
kendo
unob.click();
pending…
unobtrusive
ob.click();
pending…
obstrusive not kendo
obntkendo.click();
pending…

Compare results of other browsers

Revisions

You can edit these tests or add even more tests to this page by appending /edit to the URL. Here’s a list of current revisions for this page:

0 comments

Add a comment