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

Revision 7 of this benchmark created by Jennifer on


Description

$(function(){ })

vs

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

Preparation HTML

<script src="//code.jquery.com/jquery.js"></script>

Test runner

Ready to run.

Testing in
TestOps/sec
$.fn.ready(function() {});
$.fn.ready(function() {});
ready
$(document).ready(function() {})
$(document).ready(function() {});
ready
$(function(){ })
$(function(){ })
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.