Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Does that really speed up your application by 100x?


No 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. So just 10x slower on even this - completely not performance critical and therefore nobody would bother optimising it - method.


Some other posters are claiming 100x performance gain by using DOM API over jQuery, I make no claims to their accuracy.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: