jquery HTML element creation techniques
JavaScript performance comparison
Info
Attemps to dilucidate which option is more suitable for fast DOM manipulation: jQuery string creation, jQuery DOM manipulation methods or Javascript's documentFragment use.
Preparation code
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js">
</script>
<ul id="test-list">
</ul>
<script>
var $list = $('#test-list');
</script>
Preparation code output
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
jQuery string creation |
|
pending… |
jQuery DOM manipulation methods |
|
pending… |
Javascript's documentFragment |
|
pending… |
Javascript's document manipulation |
|
pending… |
jQuery DOM manipulation methods (fragment/DOM hybrid) |
|
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 lodr
- Revision 2: published by guu
- Revision 3: published
- Revision 4: published
0 comments