-
-
Notifications
You must be signed in to change notification settings - Fork 910
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bezier: optimize setup of bezier curves
avoid reallocations by resizing and copy the pVec into the resized m_dPoints, reduce the amount of calculations in baking to only do it once per iteration instead of twice. precompute in getYforT and getXforT return early in getYForPoint if x is equal or below 0. and use const references where we can. these changes we are now down to an average of "time to bake: 2.50µs." on my machine compared to before average of "time to bake: 11.15µs"
- Loading branch information
Showing
2 changed files
with
24 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters