getElementByClassName vs. querySelector

JavaScript performance comparison

Revision 258 of this test case created by

Preparation code

<p class="fee">Baz</p>
<p class="fi">Baz</p>
<p class="fo">Baz</p>
<p class="fum">Baz</p>
<p class="i">Baz</p>
<p class="smell">Baz</p>
<p class="foo">Foo</p>
<p class="the">Baz</p>
<p class="blood">Baz</p>
<p class="bar">Bar</p>
<p class="of">Baz</p>
<p class="baz">Baz</p>
<p class="an">Baz</p>
<p class="x">Baz</p>


    

Preparation code output

<p class="fee">Baz</p> <p class="fi">Baz</p> <p class="fo">Baz</p> <p class="fum">Baz</p> <p class="i">Baz</p> <p class="smell">Baz</p> <p class="foo">Foo</p> <p class="the">Baz</p> <p class="blood">Baz</p> <p class="bar">Bar</p> <p class="of">Baz</p> <p class="baz">Baz</p> <p class="an">Baz</p> <p class="x">Baz</p>

Test runner

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

Java applet disabled.

Testing in CCBot 2.0.0 / Other 0.0.0
Test Ops/sec

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.

0 Comments

Baz

Baz

Baz

Baz

Baz

Baz

Foo

Baz

Baz

Bar

Baz

Baz

Baz

Baz