5 ms·
> we strive here to avoid creating new functions Avoiding creating new functions or objects is a good optimization strategy, but there's most likely very littl
by z3t4 9y ago
> we strive here to avoid creating new functions
Avoiding creating new functions or objects is a good optimization strategy, but there's most likely very little gain as the optimizer will most likely inline the functions.
Always do the super naive, easier to understand version first, and only optimize after you have identified the bottleneck and measured the performance!
- throw_away 9y agoYeah, I didn't understand this line, especially as at the very end, the author suggests just using the anonymous function anyways.