Re:Writing Fast, Memory-Efficient JavaScript
by cmwelsh on Monday November 05, 2012 @04:05PM
(#4745790)
I think we are in complete agreement. Your example is a little prettier however you still have this "unoptimized" line:
If this line is executed more than once, the nested function will be created again and again, wasting memory. However, some people may see my advice here as a micro-optimization. Thus, don't make your code ugly until you identify the real-world bottlenecks. I have updated my code in the grand-parent comment to explain myself a little more clearly (maybe)...
[ Parent
| on HN ]
There are no comments on this comment yet.