Micro Optimization with matrices


I’ve just read that you can micro optimize with vectors. They say swizzeling is free and a vector costs as much as a floating point number.
So, my question is, does this count to matrices? Like, does one matrix costs as much as a floating point number and you can swizzle for free?

I realy want to know this because, i realy want to optimize the things i already have.

Thanks already!

Depends on the implementation but more often than not, a matrix is actually N times a vector (N being the number of rows). Matrix multiplication is thus N times a dot product.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.