Append Speed

JavaScript performance comparison

Test case created by Josh

Info

Is it faster to use multi select or separate lines?

Preparation code

<div id="myDiv1"></div>
<div id="myDiv2"></div>

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></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
Multiple
$('#myDiv1, #myDiv2').append('<span/>');
pending…
Seperate
$('#myDiv1').append('<span/>');
$('#myDiv2').append('<span/>');
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