mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
95cf7151b08d02e0e349fd46a9ded4f661b075c0
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 commit https://github.com/facebook/react/commit/6b90976bc10f325146b193286435a4b5015ef605.
react-fbsource-import
Languages
JavaScript
67.1%
TypeScript
29.4%
HTML
1.5%
CSS
1.1%
C++
0.6%
Other
0.2%