Appending to the DOM
JavaScript performance comparison
Info
Appending to the DOM, building using jQuery or standard HTML
Preparation code
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<div style="height: 200px; overflow: auto;">
<table id="demo">
<thead>
<tr>
<th>Name</th>
<th>Company</th>
<th>Admin</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
<script>
Benchmark.prototype.setup = function() {
var rows = 50, $table = $('#demo'), row;
};
</script>
Preparation code output
| Name | Company | Admin | Actions |
|---|
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
jQuery |
|
pending… |
HTML |
|
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:
- Revision 1: published by Matthew
- Revision 2: published
0 comments