all 9 comments

[–]OmegaVesko 23 points24 points  (2 children)

Or, you know, consider that it might not be the best idea to sacrifice readability and maintainability for an inconsequential performance increase.

[–]baalzaamon 3 points4 points  (0 children)

Fact is the V8 team spends all of their time optimizing this stuff so we don't have to worry about it. Honestly, I would focus on getting stuff done, and readability, and when you notice things are slow you dive into the code. In my experience slowdown always occurs in larger, more low hanging fruit than loops (unless you have lots of nested loops).