Dividing up a task so it can use multiple threads is not free. So you need to do som extra stuff to split it apart and collect the result.
If the matrix you multiply is small the overhead can be greater then the time you gain by doing the calculation in parallel. So splitting it up can increase the time
Try it with large matrices and you will likely se a decrease in time.
Hyperthreading is sharing the same core for two threads. You can get a bit of extra preformence if there is a lot of waiting for data from memory. So going from 2 to 4 threads likely only increase preformence if the matrix size is larger then the CPU cache size.
Latest Answers