jquery append with my testing greatness

JavaScript performance comparison

Revision 2 of this test case created

Preparation code

<script src="http://code.jquery.com/jquery-1.7.2.min.js">
  var len = 20;
  var si = [];
  for (var i = 0; i < len; i++) {
<div id="addhere">
Benchmark.prototype.setup = function() {

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
Test 1
for (var i = 0; i < len; i++) {
Test 2
var html = "";
for (var i = 0; i < len; i++) {
  html += $("<div />").append(si[i]).html();

Compare results of other browsers


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:


Comment form temporarily disabled.

Add a comment