-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Speed up Matrix4x4.CreateScale
#79172
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
Speed up Matrix4x4.CreateScale
#79172
Conversation
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch Issue DetailsIn #76491 the Jit became a little more eager to optimize code using vectors as a whole. Unfortunately, this regressed This change fixes the regression by using style that is more in line with what the Jit expects of vectors. It also optimizes related overloads by avoiding the relatively expensive Linux x64 benchmark results:
Where Fixes #78977.
|
|
Tagging subscribers to this area: @dotnet/area-system-numerics Issue DetailsIn #76491 the Jit became a little more eager to optimize code using vectors as a whole. Unfortunately, this regressed This change fixes the regression by using style that is more in line with what the Jit expects of vectors. It also optimizes related overloads by avoiding the relatively expensive Linux x64 benchmark results:
Where Fixes #78977.
|
|
Thanks for the workaround! |
In #76491 the Jit became a little more eager to optimize code using vectors as a whole. Unfortunately, this regressed
Matrix4x4.CreateScaleon some platforms because code for it is written in a way that favors promotion over whole-register access.This change fixes the regression by using style that is more in line with what the Jit expects of vectors. It also optimizes related overloads by avoiding the relatively expensive
get_Identityproperty call (that is not even inlined due to loading a value type field).Linux x64 benchmark results:
Where
Root/corerunis this change and/crb/corerunismain.Fixes #78977.