-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid calling fmod twice in roundLayoutResultsToPixelGrid #48404
Conversation
This pull request was exported from Phabricator. Differential Revision: D67689065 |
26c554e
to
79b5dac
Compare
This pull request was exported from Phabricator. Differential Revision: D67689065 |
Summary: X-link: facebook/react-native#48404 ## Changelog: [Internal] - This popped up when profiling some heavy UI performance, calling `fmod` operation in Yoga's `roundLayoutResultsToPixelGrid` in `PixelGrid.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
79b5dac
to
fa3cfe8
Compare
This pull request was exported from Phabricator. Differential Revision: D67689065 |
…8404) Summary: X-link: facebook/litho#1036 X-link: facebook/yoga#1775 ## Changelog: [Internal] - This popped up when profiling some heavy UI performance, calling `fmod` operation in Yoga's `roundLayoutResultsToPixelGrid` in `PixelGrid.cpp` can be expensive, furthermore it turns out that some of the calls were redundant. This replaces the duplicate calls to fmod with an equivalent single round operation, which for e.g. clang compiler on Windows brings 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
fa3cfe8
to
9f0fc72
Compare
This pull request was exported from Phabricator. Differential Revision: D67689065 |
) Summary: X-link: facebook/litho#1036 X-link: facebook/react-native#48404 ## Changelog: [Internal] - This popped up when profiling some heavy UI performance, calling `fmod` operation in Yoga's `roundLayoutResultsToPixelGrid` in `PixelGrid.cpp` can be expensive, furthermore it turns out that some of the calls were redundant. This replaces the duplicate calls to fmod with an equivalent single round operation, which for e.g. clang compiler on Windows brings 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
) Summary: X-link: facebook/yoga#1775 X-link: facebook/react-native#48404 ## Changelog: [Internal] - This popped up when profiling some heavy UI performance, calling `fmod` operation in Yoga's `roundLayoutResultsToPixelGrid` in `PixelGrid.cpp` can be expensive, furthermore it turns out that some of the calls were redundant. This replaces the duplicate calls to fmod with an equivalent single round operation, which for e.g. clang compiler on Windows brings 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
) Summary: X-link: facebook/litho#1036 X-link: facebook/react-native#48404 ## Changelog: [Internal] - This popped up when profiling some heavy UI performance, calling `fmod` operation in Yoga's `roundLayoutResultsToPixelGrid` in `PixelGrid.cpp` can be expensive, furthermore it turns out that some of the calls were redundant. This replaces the duplicate calls to fmod with an equivalent single round operation, which for e.g. clang compiler on Windows brings 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
) Summary: X-link: facebook/litho#1036 X-link: facebook/react-native#48404 ## Changelog: [Internal] - This popped up when profiling some heavy UI performance, calling `fmod` operation in Yoga's `roundLayoutResultsToPixelGrid` in `PixelGrid.cpp` can be expensive, furthermore it turns out that some of the calls were redundant. This replaces the duplicate calls to fmod with an equivalent single round operation, which for e.g. clang compiler on Windows brings 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
) Summary: X-link: facebook/litho#1036 X-link: facebook/react-native#48404 ## Changelog: [Internal] - This popped up when profiling some heavy UI performance, calling `fmod` operation in Yoga's `roundLayoutResultsToPixelGrid` in `PixelGrid.cpp` can be expensive, furthermore it turns out that some of the calls were redundant. This replaces the duplicate calls to fmod with an equivalent single round operation, which for e.g. clang compiler on Windows brings 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
Summary: Pull Request resolved: #1036 X-link: facebook/yoga#1775 X-link: facebook/react-native#48404 ## Changelog: [Internal] - This popped up when profiling some heavy UI performance, calling `fmod` operation in Yoga's `roundLayoutResultsToPixelGrid` in `PixelGrid.cpp` can be expensive, furthermore it turns out that some of the calls were redundant. This replaces the duplicate calls to fmod with an equivalent single round operation, which for e.g. clang compiler on Windows brings 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. Reviewed By: christophpurrer Differential Revision: D67689065 fbshipit-source-id: 2a074a1cb81bd7f7a3c414050b9ddda2ba90180f
This pull request has been merged in 6dd4195. |
This pull request was successfully merged by @rshest in 6dd4195 When will my fix make it into a release? | How to file a pick request? |
Summary: X-link: facebook/litho#1036 Pull Request resolved: #1775 X-link: facebook/react-native#48404 ## Changelog: [Internal] - This popped up when profiling some heavy UI performance, calling `fmod` operation in Yoga's `roundLayoutResultsToPixelGrid` in `PixelGrid.cpp` can be expensive, furthermore it turns out that some of the calls were redundant. This replaces the duplicate calls to fmod with an equivalent single round operation, which for e.g. clang compiler on Windows brings 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. Reviewed By: christophpurrer Differential Revision: D67689065 fbshipit-source-id: 2a074a1cb81bd7f7a3c414050b9ddda2ba90180f
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 out that some of the calls were redundant.This replaces the duplicate calls to fmod with an equivalent single round operation, which for e.g. clang compiler on Windows brings 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