Improvements to Quaternion and other structs
- Dominant language
- C#
- Stars
- 7.7k
- Forks
- 1.3k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 61
Description
After looking over Quaternion I realised that it could heavily benefit from vectorization with new hardware intrinsics in .net core. I started on vectorizing some funcions there and have massive speedups measured in Benchmark.Net. Also, Why does Quaternion not implement IEquatable as suggested per Microsoft struct guidelines? This enables EqualityComparer to take a faster path, which improves creation time of HashSet and similar. Finally, we could use the new HashCode.Combine<> in a lot of places, which would be superior to rolling out manual implementations for so many types. Finally, we could improve performance of GetHashCode in its current implementation by not calling the getter method for all properties and using the fields instead, as IsDistinguishedIdentity is already checked.
Contributor guide
Assessment
This issue has not been assessed yet.