3 ms·
> I'll just use a list for everything: the users will eat the slowdown "Premature optimization is the root of all evil." You often should use a list until you'
by john-shaffer 6y ago
> I'll just use a list for everything: the users will eat the slowdown
"Premature optimization is the root of all evil." You often should use a list until you've identified a specific performance issue. The list isn't the problem. Not actually optimizing is.
- account42 6y agoChoosing the right data structures and algorithms is not premature optimization.
- john-shaffer 6y agoI agree if you know, e.g., that the list is going to contain thousands of items or is going to be iterated over in your inner loop. That's not premature optimization, that's just common sense. Hence the qualifier "premature".
- pdimitar 6y ago> You often should use a list until you've identified a specific performance issue. Identifying a JS performance issue is something that almost no company ever does unless revenue is obviously threatened (and even then many fail to act). So IMO it pays off to do a little bit of premature optimization in JS land.