A simple comparison of Dom selection vs Jquery selection[1]
When selecting one DIV by id, I'm consistently getting:
DOM - 0.08ish ms
Jquery - 0.2ish ms
I do have an app where every millisecond is critical. For this app I'm using raw dom selectors. However, most of the time, the convenience of jquery selectors outweigh these performance gains.
When selecting one DIV by id, I'm consistently getting:
DOM - 0.08ish ms
Jquery - 0.2ish ms
I do have an app where every millisecond is critical. For this app I'm using raw dom selectors. However, most of the time, the convenience of jquery selectors outweigh these performance gains.
[1] - http://jsfiddle.net/tolmark12/9R39R/ (open console)