dustingetz/react-cursor — pull request #20 by krawaller (2014-10-08 17:11:36+00:00)
Title: optimizing shouldComponentUpdate

Since `shouldComponentUpdate` is hot code, I figured it'd be worth optimising it by paying some readability. This PR therefore...

* simplifies `refsChanged` checks if we just have a single ref field
* simplifies `valuesChanged` if we aren't ignoring any ref fields
* preruns the ignore union
* minimizes object lookups
* only calculates `refsChanged` if `valuesChanged` wasn't true
* minimizes function calls