dillon1000/react
Commit
Browse files Increase speed of shallowEqual
All testes successfully completed. - for-in in browsers is slow, i replaced him by Object.keys + for(array) - simple check of lengths let us not iterate if not same - now we dont need to test for B's keys missing from A, because if length's is same and prev check success - objB hasn't more keys - micro optimize: calling objB.hasOwnProperty - micro optimize: replaced !objA || !obj for more speedy check === null #inspiredby https://github.com/jurassix/react-immutable-render-mixin/pull/4
Changed paths1 file
First-parent comparisonsrc/utils/shallowEqual.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…