dotnet / dotnet/wpf

Improvements to Quaternion and other structs

Open
#768 4 comments 0 reactions 0 assignees View on GitHub
Design Discussion Enhancement Requested Performance
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.