Closed ttback closed 9 years ago
Messing with something like scroll events is related to the DOM, not JavaScript per se. There are some edge cases where JS should be optimized, but it's extremely unusual. In most cases, perf issues won't be related to JS.
Although this has already been closed it's important to add that if you're using scroll events, you're nearly always doing something horribly wrong and should be using requestAnimationFrame instead.
Never worry about writing performant JS just doesn't make any sense... for example, throttle on things like scrolling event is essential to have smooth 60 fps scrolling. Since JS will never be a perf bottleneck, why would people still bother to pre-compile handlebar templates?