svetlo
JavaScript performance comparison
Preparation code
<div id="test">
<p>a</p><p>a</p><p>a</p><p>a</p><p class="hello">a</p><p>a</p><p class="world">a</p><p>a</p><p>a</p><p>a</p><p>a</p>
</div>
<script>
var a = Array.prototype.slice.call(document.querySelectorAll('p'));
var b = document.querySelectorAll('p');
var c = document.getElementsByTagName('p');
var d = document.querySelectorAll.call(document, 'p');
</script>
Preparation code output
a
a
a
a
a
a
a
a
a
a
a
Test runner
Warning! For accurate results, please disable Firebug before running the tests. (Why?)
Java applet disabled.
| Test | Ops/sec | |
|---|---|---|
Svetlo - Selector Engine |
|
pending… |
Native querySelectorAll |
|
pending… |
Native getElementsByTagName |
|
pending… |
QSA - Selector Engine |
|
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