event_perf_jq (v3)

Revision 3 of this benchmark created on


Preparation HTML

<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
 
<script>
  $("body")
        .append(function() {
                var html = "";
                for ( var i = 0; i < 5000; i++ ) {
                        html += "<div><div><div><div><a href='#'>hogehoge</a></div></div></div></div>";
                }
                return html;
        });
</script>

Test runner

Ready to run.

Testing in
TestOps/sec
$("a").bind("click")
$("a").bind(function() {
  console.log("hogehoge");
});
ready
$(document).delegate("a", "click")
$(document).delegate("a", "click", function() {
  console.log("piyopiyo");
});
ready

Revisions

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