jQuery body vs. document selector
JavaScript performance comparison
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.
| Test | Ops/sec | |
|---|---|---|
$('body') |
|
pending… |
$(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:
- Revision 1: published by Justin H. Johnson and last updated
- Revision 2: published by Mathias Bynens and last updated
- Revision 3: published
- Revision 4: published by devu
- Revision 5: published by devu
- Revision 6: published
- Revision 7: published
- Revision 9: published by mekwall
- Revision 10: published
- Revision 11: published
- Revision 12: published
- Revision 13: published by Chen-Pang He
- Revision 14: published
4 comments
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.
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.
Hurrah, that's what I was searching for, what a data! existing here at this weblog, thanks admin of this web site.
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!