I have noticed while monitoring/attempting to answer common jQuery questions, that there are certain practices using javascript, instead of jQuery, that actually enable you
There's a framework called... oh guess what? Vanilla JS. Hope you get the joke... :D It sacrifices code legibility for performance... Comparing it to jQuery
bellow you can see that retrieving a DOM
element by ID
is almost 35X faster. :)
So if you want performance you'd better try Vanilla JS and draw your own conclusions. Maybe you won't experience JavaScript hanging the browser's GUI/locking up the UI thread during intensive code like inside a for
loop.
Vanilla JS is a fast, lightweight, cross-platform framework for building incredible, powerful JavaScript applications.
On their homepage there's some perf comparisons: