jQuery Append

Benchmark created on


Description

Testing Performance

Preparation HTML

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

Setup

var a = $('#parent');
    
    a.html('<p>Already Exists</p>');

Test runner

Ready to run.

Testing in
TestOps/sec
Append
for(var i = 10; i--;)
   a.append('<p>Hello</p>');
ready
Append All
var b = [];
for(var i = 10; i--;)
   b.push('<p>Hello</p>');
a.append(b);
ready
Blob
var b = '';

for(var i = 10; i--;)
   b += '<p>Hello</p>';

a.append(b);
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.