Given a `row_vector`

of size `M`

and a `matrix`

of size `MxN`

, I’m doing matrix product by `row_vector * matrix`

.

I’m thinking if it’ll be faster or slower if we define a `MATRIX`

of size `NxM`

and a `vector`

of size `M`

, and then do matrix product by `MATRIX * vector`

.

In my problem, `M`

is small (e.g., = 10) but `N`

may be large (e.g., = 10000). Very much appreciate if you could advise which way of matrix product will be faster.