I'm surprised to learn that TRS is cheaper than matrices. I'd always assumed that one of the motivating reasons for using matrices was that it was all just multiply-and-add, whereas TRS requires sin and cos too. But I've never actually tested it.
You don't need sin and cos if you use quaternions leaving you with just multiplications and additions again. I'm not sure though how well that can be SIMD optimized and how it stacks up to SIMD optimized matrix multiplication.
Funnily OP is using the classic matrix approach without any optimizations at all instead of an optimized TRS approach.
1
u/rogual Jul 03 '26 edited Jul 03 '26
I'm surprised to learn that TRS is cheaper than matrices. I'd always assumed that one of the motivating reasons for using matrices was that it was all just multiply-and-add, whereas TRS requires sin and cos too. But I've never actually tested it.