View Full Version : Micro Optimization with matrices

08-24-2016, 06:29 AM

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!

08-24-2016, 02:43 PM
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.