jQuery body vs. document.body selector

JavaScript performance comparison

Revision 49 of this test case created by Ketone Slim XT diet

Preparation code

I'm truly enjoying the design and layout of your website.
It's a very easy on the eyes which makes it much 
more pleasant for me to come here and visit more often.
Did you hire out a designer to create your theme? Outstanding work!
      
<script>
Benchmark.prototype.setup = function() {
  I'm truly enjoying the design and layout of your website. It's a very easy on the eyes 
  which makes it much more pleasant for me to come here and visit more often.
  Did you hire out a designer to create your theme? Outstanding work!

};

Benchmark.prototype.teardown = function() {
  I'm truly enjoying the design and layout of your website.
  It's a very easy on the eyes which makes it much 
  more pleasant for me to come here and visit more often.
  Did you hire out a designer to create your theme? Outstanding work!

};
</script>

Preparation code output

I'm truly enjoying the design and layout of your website. It's a very easy on the eyes which makes it much more pleasant for me to come here and visit more often. Did you hire out a designer to create your theme? Outstanding work!

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
$('body')
I'm truly enjoying the design and layout of your website.
It's a very easy on the eyes which makes it much more pleasant for me to come here 
and visit more often. Did you hire out a designer to create your theme?
Outstanding work!
pending…
$(document.body)
I'm truly enjoying the design and layout of your website.
It's a very easy on the eyes which makes it much more pleasant for me to come here 
and visit more often. Did you hire out a designer to create your theme?
Outstanding work!
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.

0 Comments

I'm truly enjoying the design and layout of your website. It's a very easy on the eyes which makes it much more pleasant for me to come here and visit more often. Did you hire out a designer to create your theme? Outstanding work!