Page MenuHomeWildfire Games

SSE Vector3D
Needs ReviewPublic

Authored by OptimusShepard on Jun 5 2020, 9:52 PM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

Using vector extensions SSE to improve performance.
The idea is, to have some general performance improvements here, and do some special optimizations later, in part of the code, where these functions are excessive used.

Test Plan

Use profiler2, to compare the old implementation to the new one. The more units, the better the accuracy of the comparison, I think.

Diff Detail

Unit TestsFailed

TimeTest
0 msJenkins > TestBound::test_aabb_to_obb_rotation_around_origin
Error: Expected (result.m_Basis[0].Y == 1.f) up to 1e-7f (0.0000), found (0.9997 != 1.0000)
0 msJenkins > TestBound::test_aabb_to_obb_rotation_around_point
Error: Expected (result.m_Basis[0].X == invSqrt2) up to 1e-7f (0.0000), found (0.7072 != 0.7071)
0 msJenkins > TestBound::test_aabb_to_obb_scale
Error: Expected (result.m_Basis[0].X == 1.f) up to 1e-7f (0.0000), found (0.9997 != 1.0000)
0 msJenkins > TestBound::test_aabb_to_obb_translation
Error: Expected (result.m_Basis[0].X == 1.f) up to 1e-7f (0.0000), found (0.9997 != 1.0000)
0 msJenkins > TestCamera::test_frustum_ortho
Test failed: CPlane[Norm=[-1, 0, 0], Dist=9.9951] Test failed: CPlane[Norm=[1, 0, 0], Dist=9.9951] Test failed: CPlane[Norm=[0, 1, 0], Dist=9.9975]
View Full Test Results (7 Failed · 336 Passed)

Event Timeline

OptimusShepard created this revision.Jun 5 2020, 9:52 PM
OptimusShepard created this object with edit policy "Custom Policy".
Vulcan added a comment.Jun 5 2020, 9:54 PM

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2331/display/redirect

Vulcan added a comment.Jun 5 2020, 9:54 PM

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/1800/display/redirect

OptimusShepard changed the visibility from "Public (No Login Required)" to "Custom Policy".Jun 5 2020, 10:00 PM
OptimusShepard edited the summary of this revision. (Show Details)
OptimusShepard edited the test plan for this revision. (Show Details)
OptimusShepard changed the visibility from "Custom Policy" to "Public (No Login Required)".
OptimusShepard changed the edit policy from "Custom Policy" to "All Users".

The current version is not profiled yet, so I do not know, which of these functions will improve performance.
"-" and "+" seems to have grate impact to the game, when many units are in the field of view. Until yet I didn't get it profiled, when many units are used.

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2417/display/redirect

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/1886/display/redirect

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/vs2015-differential/1887/display/redirect

Using intrinsic functions highly depends on a context. I'd like to see a comparison test for each method of CVector3D (without the game, one might just use tests).

Build failure - The Moirai have given mortals hearts that can endure.

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/2418/display/redirect

Krinkle added a subscriber: Krinkle.