STRML / react-router-component

Declarative router component for React.
http://strml.viewdocs.io/react-router-component
MIT License
873 stars 94 forks source link

optimize for loop #143

Closed yiziz closed 9 years ago

STRML commented 9 years ago

This is actually slower.

In any case, please don't worry about these kinds of micro-optimizations. JS engines change all the time and what was slow becomes fast; and workarounds to try to optimize almost always lead to worse code.

Even in the best case, you're talking about an operation that runs only once per route change; and at its slowest, the JS engine can execute this over a million and a half times a second; ie, this is not an actual bottleneck by any stretch of the imagination.