Skip to content
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

Optimize Usd_LinearInterpolator. #1883

Merged

Conversation

mtavenrath
Copy link
Contributor

Description of Change(s)

Swapping the lowerValue with the _result and calling _result.data() afterwards results in a memmove in the data() function call. Later on the Usd_Lerp loop overwrites the all values which have been copied before with the memmove call making the memmove an expensive nop.

Also using operator[] on each loop iteration on upperValue results in a function call to uperValue.data() on each loop iteration which can easily be avoided by fetching the data pointer once before.

Fixes Issue(s)

Improves performance of Usd_LinearInterpolator.

  • I have submitted a signed Contributor License Agreement

…sult and calling _result.data() afterwards results in a memmove in the data() function call. Later on the Usd_Lerp loop overwwrite the all values which have been copied before with the memmove call making the memmove an expensive nop.

Also using operator[] on each loop iteration on upperValue results in a function call to uperValue.data() on each loop iteration which can easily be avoided by fetching the data pointer once before.
@jilliene
Copy link

Filed as internal issue #USD-7389

@pixar-oss pixar-oss merged commit 3128ef1 into PixarAnimationStudios:dev Jun 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants