mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
bdb1083dfa38c58d8898826aa7144b6454a712e1
Since `props.x` is a possibly megamorphic access, it can be slow to
access and trigger recompilation.
When we are looping over the props and pattern matching every key,
anyway, we've already done this work. We can just reuse the same value
by stashing it outside the loop in the stack.
This only makes sense for updates in diffInCommitPhase since otherwise
we don't have the full set of props in that loop.
We also have to be careful not to skip over equal values since we need
to extract them anyway.
DiffTrain build for [6b90976bc1](https://github.com/facebook/react/commit/6b90976bc10f325146b193286435a4b5015ef605)
Please do not delete this branch
Description
Languages
JavaScript
67.1%
TypeScript
29.4%
HTML
1.5%
CSS
1.1%
C++
0.6%
Other
0.2%