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

Inefficient MatrixOfMinorsLaplace in FastMatrix4x4f_CM #18

Closed BigUglySpider closed 3 years ago

BigUglySpider commented 3 years ago

As of commit 4b8b1a10a3ed2d88283c2cd04369d68550fb3eeb, FastMatrix4x4f_CM has access to the laplace expansion methods that the scalar matrix has access to.

However, this is implemented highly inefficiently due to the root function for each step in the laplace expansions methods: MatrixOfMinors.

As the matrix of minors is the first step for any ...Laplace function, their performance is strongly tied to that of MatrixOfMinors. An improvement of efficiency to this would, as a result, be an improvement to the efficiency of all ...Laplace functions in FastMatrix4x4f_CM.

BigUglySpider commented 3 years ago

It should be noted that this has been classed as lower priority due to Inverse (the main operation one would likely want in scenarios where MatrixOfMinorsLaplace may be called) already being implemented via gaussian elimination.

BigUglySpider commented 3 years ago

As of commit dd9b0ea60f0eb8efa70f5ee4efc023839cf61f37, this issue has been address. Taken verbatim from the commit:


No longer brute forcing minors function, and allowed optional possibility to transpose the output automatically (this uses an altered shuffle for the output, and thus has the same overhead as constructing the non-transposed version).

This addresses the recently published issue regarding the performance of MatrixOfMinors.