jQuery body vs. document.body selector

JavaScript performance comparison

Revision 44 of this test case created by http://elliskinfacts.net

Preparation code

Please let me know if you're looking for 
a writer for your weblog. You have some really great posts and I believe I would be a good asset.
If you ever want to take some of the load off, I'd really like to write some articles for your 
blog in exchange for a link back to mine. Please send me 
an email if interested. Many thanks!
      
<script>
Benchmark.prototype.setup = function() {
  NJ

};

Benchmark.prototype.teardown = function() {
  NJ

};
</script>

Preparation code output

Please let me know if you're looking for a writer for your weblog. You have some really great posts and I believe I would be a good asset. If you ever want to take some of the load off, I'd really like to write some articles for your blog in exchange for a link back to mine. Please send me an email if interested. Many thanks!

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')
Please let me know if you're looking for a writer for your weblog.

You have some really great posts and I believe I would be a good asset.

If you ever want to take some of the load off,
I'd really like to write some articles for your blog in exchange for a link back to mine.
Please send me an email if interested. Many thanks!
pending…
$(document.body)
Please let me know if you're looking for a writer for your weblog.
You have some really great posts and I believe I would 
be a good asset. If you ever want to take some of the load off, I'd really like 
to write some articles for your blog in exchange for a 
link back to mine. Please send me an email if interested.
Many thanks!
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

Please let me know if you're looking for a writer for your weblog. You have some really great posts and I believe I would be a good asset. If you ever want to take some of the load off, I'd really like to write some articles for your blog in exchange for a link back to mine. Please send me an email if interested. Many thanks!