jQuery body vs. document selector

JavaScript performance comparison

Revision 7 of this test case created

Preparation code

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>

Test runner

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

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
$('body')
$('body');
pending…
$(document)
$(document);
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:

4 comments

last commented :

Wonderful goods from you, man. I have remember your stuff previous to and you're just extremely fantastic. I really like what you've acquired right here, certainly like what you are stating and the best way in which you say it. You make it entertaining and you continue to care for to keep it smart. I can't wait to read far more from you. That is really a wonderful website.

golf equipment commented :

Everyone loves what you guys tend to be up too. This sort of clever work and exposure! Keep up the terrific works guys I've added you guys to my personal blogroll.

sims commented :

Hurrah, that's what I was searching for, what a data! existing here at this weblog, thanks admin of this web site.

Gaydownloads commented :

Woah! I'm really digging the template/theme of this site. It's simple, yet effective. A lot of times it's difficult to get that "perfect balance" between user friendliness and visual appeal. I must say you've done a very good job with this. Additionally, the blog loads extremely fast for me on Safari. Superb Blog!

Add a comment