I know that coding in native JavaScript means that your code will execute faster than if you were to code it in jQuery, but how much faster?
In particular, I want to know if the speed increase would make it worth while spending the longer time coding in native JavaScript than jQuery if it was for a very large webapp?
Or is the difference in speed not that great at all?
For instance, to setup an AJAX request in jQuery all you have to do is call $.ajax or $.post and pass a few parameters, but with native JavaScript you have to create XMLHttpRequest or ActiveXObject objects depending on the users browser etc etc.
The difference in speed is in milliseconds – which can add up with thousands of jQuery calls.
The reason is that with jQuery, it tests different scenarios by the information you feed it, so it can function in many ways – even in ways that you will never use. For the functions you DO use, jQuery still performs tests on possible variables and scenarios that you will never feed it for your particular app.
That is what makes it slower. It really depends on how many calls to jQuery you will be making.
Although, it is also very cross-browser compatible, which is a big plus.
I would recommend jQuery personally, for many reasons. But again, it depends on how heavy you will need to use it, and what you define as a “great” difference.