Added SSE support for Quaternion operations#97
Merged
bvisness merged 2 commits intoHandmadeMath:quaternion-ssefrom Mar 11, 2019
Merged
Added SSE support for Quaternion operations#97bvisness merged 2 commits intoHandmadeMath:quaternion-ssefrom
bvisness merged 2 commits intoHandmadeMath:quaternion-ssefrom
Conversation
O2 | Function | SSE | NO SSE | ==================================================== | Inverse | 163 (0.89s) | 165 (1.89s) | | NLerp | 330 (1.70s) | 330 (1.75s) | | Normalize | 169 (1.03s) | 169 (1.06s) | | Dot | 22 (1.15s) | 23 (1.14s) | | DivF | 23 (0.72s) | 23 (0.82s) | | MulF | 22 (0.75s) | 22 (0.79s) | | Mul | 24 (1.14s) | 23 (1.24s) | | Sub | 23 (1.17s) | 37 (1.20s) | | Add | 23 (1.20s) | 24 (1.19s) | O0 | Function | SSE | NO SSE | ==================================================== | Inverse | 394 (1.62s) | 430 (3.05s) | | NLerp | 694 (2.71s) | 1035(4.81s) | | Normalize | 374 (1.58s) | 412 (2.95s) | | Dot | 81 (1.83s) | 23 (2.50s) | | DivF | 61 (1.12s) | 25 (2.37s) | | MulF | 58 (1.09s) | 23 (2.31s) | | Mul | 94 (1.97s) | 42 (2.88s) | | Sub | 75 (1.83s) | 23 (2.82s) | | Add | 75 (1.81s) | 23 (2.81s) |
Old quaternion multiplication had a bug, this is a different approach.
|
Cool! |
Member
|
Talk about a well done PR! I’ll check this out tonight |
Member
|
I like this a lot, can't find any issues after doing a pass over this. @bvisness are you okay with me merging this in? |
Member
Author
|
No problem :) |
bvisness
added a commit
that referenced
this pull request
Mar 11, 2019
* Added SSE support for Quaternion operations (#97) * Added SSE support for Quaternion operations O2 | Function | SSE | NO SSE | ==================================================== | Inverse | 163 (0.89s) | 165 (1.89s) | | NLerp | 330 (1.70s) | 330 (1.75s) | | Normalize | 169 (1.03s) | 169 (1.06s) | | Dot | 22 (1.15s) | 23 (1.14s) | | DivF | 23 (0.72s) | 23 (0.82s) | | MulF | 22 (0.75s) | 22 (0.79s) | | Mul | 24 (1.14s) | 23 (1.24s) | | Sub | 23 (1.17s) | 37 (1.20s) | | Add | 23 (1.20s) | 24 (1.19s) | O0 | Function | SSE | NO SSE | ==================================================== | Inverse | 394 (1.62s) | 430 (3.05s) | | NLerp | 694 (2.71s) | 1035(4.81s) | | Normalize | 374 (1.58s) | 412 (2.95s) | | Dot | 81 (1.83s) | 23 (2.50s) | | DivF | 61 (1.12s) | 25 (2.37s) | | MulF | 58 (1.09s) | 23 (2.31s) | | Mul | 94 (1.97s) | 42 (2.88s) | | Sub | 75 (1.83s) | 23 (2.82s) | | Add | 75 (1.81s) | 23 (2.81s) | * Fixed quaternion multiplication Old quaternion multiplication had a bug, this is a different approach. * Added release notes and version for 1.9.0
Closed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added SSE support for almost all operations involving quaternions (Inverse, NLerp, Normalize, Dot, DivF, MulF, Mul, Sub, Add). SLerp also mostly supports SSE now since it largely calls the other quaternion operations.
Benchmarks:
Tests: