$(function(){ }) vs $(document).ready(function() {})

JavaScript performance comparison

Revision 4 of this test case created

Info

$(function(){ })

vs

$(document).ready(function() {})

Preparation code

<script src="//code.jquery.com/jquery.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
$(function(){ })
$.fn.ready(function() {});
pending…
$(document).ready(function() {})
$(document).ready(function() {});
pending…
ready
$(function(){ })
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:

2 comments

anunturi.ws commented :

Howdy! Someone in my Facebook group shared this website with us so I came to take a look. I'm definitely enjoying the information. I'm bookmarking and will be tweeting this to my followers! Excellent blog and great design.

anunturi commented :

Anunturi Cluj si din toate localitatile din judetul Cluj. Anunturi Cluj Napoca, Campia Turzii, Dej

Add a comment