Test jQuery append performance
JavaScript performance comparison
Preparation code
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
</script>
<div class="grid-container">
<div class="grid">
</div>
</div>
<script>
Benchmark.prototype.setup = function() {
var $gridTpl = $(".grid"),
$gridContainer = $(".grid-container");
};
Benchmark.prototype.teardown = function() {
$(".grid-container").remove();
};
</script>
Preparation code output
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
append one by one |
|
pending… |
append once |
|
pending… |
You can edit these tests or add even more tests to this page by appending /edit to the URL.
1 comment
check http://api.jquery.com/append/
we can use $().append( [] ) .