test

JavaScript performance comparison

Test case created by Josh Vermaire

Preparation code

<div id="wrap">
<div>
<div>
<div>
<stronged class="text">text</stronged>
</div>
</div>
</div>
</div>
<script>
Benchmark.prototype.setup = function() {
    var wrap = document.getElementById('wrap')
};
</script>

Preparation code output

text

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
firstchild
wrap.firstElementChild.firstElementChild.firstElementChild.firstElementChild
pending…
tagname
wrap.getElementsByTagName('stronged')
pending…
classname
wrap.getElementsByClassName('text')
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

Add a comment