3 ms·
Does that really speed up your application by 100x?
by jimbokun 14y ago
Does that really speed up your application by 100x?
- MatthewPhillips 14y agoSome other posters are claiming 100x performance gain by using DOM API over jQuery, I make no claims to their accuracy.
- timruffles 14y agoNo way - even if it was the sole performance bottleneck in your application (which as I've commented above is absurd, and a sign you're doing it so very, very wrong). Even if your application was: var i = 100; while(i--) els[i].addEventListener("click",fn); it'd be untrue jQuery is nowhere _near_ 100x slower. Profiling this is totally ridiculous because there's no use case that requires adding event listeners at a scale that could _ever_ be a performance concern, but anyway - http://jsperf.com/jquery-on-vs-native/3 http://jsperf.com/jquery-on-vs-native/3. So just 10x slower on even this - completely not performance critical and therefore nobody would bother optimising it - method.