Avoid calling fmod twice in roundLayoutResultsToPixelGrid #1775
Reference in New Issue
Block a user
No description provided.
Delete Branch "export-D67689065"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary:
X-link: https://github.com/facebook/react-native/pull/48404
Changelog:
[Internal] -
This popped up when profiling some heavy UI performance, calling
fmod
operation in Yoga'sroundLayoutResultsToPixelGrid
inPixelGrid.cpp
can be expensive, furthermore it turns that some of the calls were redundant.This replaces the duplicate calls to fmod with an equivalent single round operation, which for clang compiler on Windows bring the code in question from ~50 instructions (including 4 call instructions to the fmod function) down to ~30 instructions (without any external calls), and the layout operation being ~1% more efficient for the particular benchmark I was looking into.
Differential Revision: D67689065
The latest updates on your projects. Learn more about Vercel for Git ↗︎
This pull request was exported from Phabricator. Differential Revision: D67689065
This pull request was exported from Phabricator. Differential Revision: D67689065
This pull request was exported from Phabricator. Differential Revision: D67689065
This pull request has been merged in facebook/yoga@91997d6cd3.
Pull request closed