VecPP / vecpp

A simple C++17 vector math library
Boost Software License 1.0
10 stars 4 forks source link

Need dedicated 3x3 and 4x4 matrix inversion algorithms #29

Open FrancoisChabot opened 6 years ago

FrancoisChabot commented 6 years ago

Everything up to 4D must be screaming fast.

FrancoisChabot commented 6 years ago

Do we? Do we actually need this?

The 3X3 determinant code can be shown to generate identical assembly to the general one: https://gcc.godbolt.org/z/fIxrJs

So I think we need to validate that we need to do better before putting in the specialization

FrancoisChabot commented 6 years ago

Anecdotally, it would appear that glm's 4x4 algorithm does lead to smaller code (assuming I didn't fail the transcription).

https://gcc.godbolt.org/z/V1fJCM

However, Vecpp's current inversion algorithm is REALLY stupid, so it might be possible to do much better in the generic code.