2 ms·
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
by tolmark12 14y ago
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.
[1] - http://jsfiddle.net/tolmark12/9R39R/ http://jsfiddle.net/tolmark12/9R39R/ (open console)