I have already checked some posts like event-listener-vs-event-handler and onclick-vs-event-handler comparing the two.. but not in the performance perspective.
Of course using unobtrusive js is best practice but when it comes to performance?
Imagine we have 100 elements to listen to; which one will perform faster and make our app light and not consume lot of memory?
<button onclick="myFunction()">Click me</button>
or the event listener like in jQuery for example:
$( "#target" ).click(function() {
alert( "Handler for .click() called." );
});
UPDATE
Lets imagine worst scenarios; we want to run our web app in cheap mobile phone with 256 MB of ram! Having to listen to many events will take some considerable space in the memory (I guess!) making the browser "slow" to respond.. but using the onclick option doesn't require the browser to cash all this events, but, fire them when needed (clicked). Would be great to see some test reports.