Skip to content
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

Additional cleanup and acceleration of the System.Numerics vector and related types #103527

Merged
merged 10 commits into from
Jun 20, 2024

Conversation

tannergooding
Copy link
Member

@tannergooding tannergooding commented Jun 15, 2024

Similar overall improvements to the PR this is continuing from. Most remain identical to what they were previously:

Method Toolchain Mean Error StdDev Median Min Max Ratio RatioSD
Plane.DotCoordinateBenchmark runtime-base 0.7257 ns 0.0085 ns 0.0075 ns 0.7241 ns 0.7169 ns 0.7398 ns 1.00 0.01
Plane.DotCoordinateBenchmark runtime 0.5491 ns 0.0197 ns 0.0184 ns 0.5382 ns 0.5358 ns 0.5879 ns 0.76 0.03
Plane.NormalizeBenchmark runtime-base 1.1018 ns 0.0207 ns 0.0193 ns 1.0922 ns 1.0873 ns 1.1382 ns 1.00 0.02
Plane.NormalizeBenchmark runtime 1.1102 ns 0.0296 ns 0.0277 ns 1.0938 ns 1.0860 ns 1.1548 ns 1.01 0.03
Plane.TransformByMatrix4x4Benchmark runtime 11.3975 ns 0.0586 ns 0.0519 ns 11.4152 ns 11.3087 ns 11.4736 ns 1.00 0.01
Plane.TransformByMatrix4x4Benchmark runtime-base 9.5247 ns 0.0415 ns 0.0368 ns 9.5240 ns 9.4585 ns 9.5803 ns 0.84 0.00
Quaternion.DivisionOperatorBenchmark runtime-base 4.1745 ns 0.0149 ns 0.0132 ns 4.1728 ns 4.1580 ns 4.2009 ns 1.00 0.00
Quaternion.DivisionOperatorBenchmark runtime 1.2661 ns 0.0039 ns 0.0030 ns 1.2660 ns 1.2628 ns 1.2734 ns 0.30 0.00
Quaternion.MultiplyByQuaternionOperatorBenchmark runtime-base 2.2240 ns 0.0162 ns 0.0144 ns 2.2184 ns 2.2091 ns 2.2562 ns 1.00 0.01
Quaternion.MultiplyByQuaternionOperatorBenchmark runtime 0.5656 ns 0.0232 ns 0.0217 ns 0.5499 ns 0.5478 ns 0.6062 ns 0.25 0.01
Quaternion.ConcatenateBenchmark runtime-base 3.1269 ns 0.0402 ns 0.0376 ns 3.1064 ns 3.0917 ns 3.1953 ns 1.00 0.02
Quaternion.ConcatenateBenchmark runtime 0.5663 ns 0.0227 ns 0.0213 ns 0.5633 ns 0.5338 ns 0.6047 ns 0.18 0.01
Quaternion.ConjugateBenchmark runtime-base 0.1936 ns 0.0124 ns 0.0116 ns 0.1857 ns 0.1818 ns 0.2111 ns 1.00 0.08
Quaternion.ConjugateBenchmark runtime 0.1968 ns 0.0162 ns 0.0151 ns 0.1878 ns 0.1837 ns 0.2265 ns 1.02 0.10
Quaternion.CreateFromAxisAngleBenchmark runtime-base 7.7296 ns 0.0161 ns 0.0151 ns 7.7302 ns 7.6947 ns 7.7572 ns 1.00 0.00
Quaternion.CreateFromAxisAngleBenchmark runtime 7.4446 ns 0.0478 ns 0.0447 ns 7.4217 ns 7.4048 ns 7.5371 ns 0.96 0.01
Quaternion.InverseBenchmark runtime-base 0.9127 ns 0.0110 ns 0.0103 ns 0.9101 ns 0.9014 ns 0.9351 ns 1.00 0.02
Quaternion.InverseBenchmark runtime 1.2364 ns 0.1370 ns 0.1577 ns 1.1716 ns 1.0853 ns 1.5973 ns 1.35 0.17
Quaternion.LerpBenchmark runtime-base 5.0949 ns 0.0332 ns 0.0310 ns 5.0914 ns 5.0590 ns 5.1670 ns 1.00 0.01
Quaternion.LerpBenchmark runtime 1.6378 ns 0.0297 ns 0.0278 ns 1.6312 ns 1.6031 ns 1.6804 ns 0.32 0.01
Quaternion.MultiplyByQuaternionBenchmark runtime-base 2.2071 ns 0.0051 ns 0.0042 ns 2.2056 ns 2.2036 ns 2.2187 ns 1.00 0.00
Quaternion.MultiplyByQuaternionBenchmark runtime 0.5629 ns 0.0293 ns 0.0274 ns 0.5437 ns 0.5400 ns 0.6083 ns 0.26 0.01
Quaternion.SlerpBenchmark runtime-base 5.1270 ns 0.0144 ns 0.0135 ns 5.1238 ns 5.1027 ns 5.1533 ns 1.00 0.00
Quaternion.SlerpBenchmark runtime 1.6400 ns 0.0270 ns 0.0252 ns 1.6321 ns 1.6087 ns 1.6817 ns 0.32 0.00

martenf and others added 8 commits March 11, 2024 17:20
Vector3.Cross(Vector3 vector1, Vector3 vector2)
Vector3.Transform(Vector3 value, Quaternion rotation)
added simd paths for quaternion multiplication, division and concatenate
added simd path for matrix4x4 multiplication
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-numerics
See info in area-owners.md if you want to be subscribed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants