jQuery Raw HTML Performance

JavaScript performance comparison

Revision 4 of this test case created

Info

Testing 1000 rows x 10 columns.

Preparation code

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<table id="target"></table>

<script>
  var data = [];
 
  for (var i = 0; i < 1000; i++) {
   var s = '<tr>';
   s += '<td>' + i + '</td>';
   s += '<td>foo</td>';
   s += '<td>50</td>';
   s += '<td>255</td>';
   s += '<td>http://abc.xyz.com</td>';
   s += '<td>bar</td>';
   s += '<td>baz</td>';
   s += '<td>30</td>';
   s += '<td>john</td>';
   s += '<td>doe</td>';
   s += '</tr>';
 
   data.push(s);
  }
</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
jQuery Building Raw HTML
$(data.join('')).appendTo("#target");
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