is delegate the fastest way of binding?
jquery, performance
Solution
The error you made was to think there was only one p element.
I added another test, with only `console.log($('p').length);` and it showed that there was 7 p visible from the test, whose visibility was obviously not limited to the HTML you built in the preparation code.
This means that the two first functions had to do 7 more bindings.
Problem
Could someone explain why delegate seems faster than alias binding or on(). This is a test case: jsPerf ``` $('p').on('click',$.noop); //80% slower $('p').click($.noop); //84% slower $(document).delegate("p", "click",$.noop); //fastest ``` Checking jquery source, it seems like before binding any event, jquery check for delegates. Is it a correct statement or is there anything else?