BigUglySpider / EmuLibs

Selection of libraries designed to be used with Emu projects. This was originally a Math library only, but has since been changed to hold all Emu libraries to enable consistency in changes to dependencies (such as EmuCore modifications).
https://biguglyspider.github.io/math
0 stars 0 forks source link

Matrix update fast matrix update internals #63

Closed BigUglySpider closed 2 years ago

BigUglySpider commented 2 years ago

Rework of FastMatrix implementation which decouples it from FastVector.

This addresses performance concerns as per issue #62. Interface implementation is at the same point as before the merge, with perhaps some unimportant exceptions.

It was decided to implement this rework now instead of later as FastMatrix was still very early in its development; better to tackle performance concerns early than to let them fester and make a rework harder.

The changes here bring FastMatrix on par with DirectXMath equivalents, removing the latency recorded as of issue #62. This includes load-operate-store combinations, where we load a scalar matrix into SIMD, operate on it, and then store it back into a scalar matrix, which was previously significantly slower (although appears to be unrecorded in the mentioned issue). There are occasions where FastMatrix performs better quite consistently, however this is likely just an anomaly in the timings as this occasional lead also goes to DirectXMath.

This also includes the following new functionalities: