ID DOM lookup

JavaScript performance comparison

Test case created

Preparation code

<div class='a'><div id='b'/></div><script src=""></script>
Benchmark.prototype.setup = function() {
    var $a = $('.a');

Preparation code output

Test runner

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

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
Straight test lookup
Stored variable lookup

You can edit these tests or add even more tests to this page by appending /edit to the URL.

Compare results of other browsers


Comment form temporarily disabled.

Add a comment