-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Conversation
Codecov Report
@@ Coverage Diff @@
## master #643 +/- ##
=========================================
- Coverage 88.28% 88.18% -0.1%
=========================================
Files 49 49
Lines 367 364 -3
=========================================
- Hits 324 321 -3
Misses 43 43
Continue to review full report at Codecov.
|
I like such changes, prev realusation of compose usually had same behaviour as here https://github.com/reactjs/redux/blob/master/src/compose.js |
interesting change, and i wonder how much performance increase on today's CPU, that has heighly optimized if else branch prediction. about @istarkov mentioned some strange use cases, i came across through contribute to spectrum). (cc @mxstbr |
Yes, I think we can accept it. The new approach is the reason why the "identity" function has the name "identity," and I like it. :) |
Hi! I came upon this PR while reviewing the proposed upgrades to our app's dependencies. I appreciate the slightly shorter version of the implementation but had one question come up. It seems the initial motivation was to optimize away the However, it seems that this trades a one-time cost at composition time I'm not familiar with the details on how the engines would actually treat or optimize this but in general the cost of a function call is usually higher than an
const myFunc = compose(fn1, fn2, f3);
myFunc('foobar') |
Hi. it's not a issue, but made simple compose without 'if'. thanks.