I am making some matrix multiplication benchmarking, as previously mentioned in Why is matlab so fast in matrix multiplication?
Now I've got another issue, when multiplying two 2048x2048 matrices, there is a big difference between C# and others. When I try multiply only 2047x2047 matrices, it feels normal.
1024x1024 - 10 seconds.
2047x2047 - 90 seconds.
2048x2048 - 300 seconds.
2049x2049 - 91 seconds. (update)
That is three and a half minute difference for the 2k by 2k case.
using 2dim arrays
//Array init like this
int rozmer = 2048;
float[,] matice = new float[rozmer, rozmer];
//Main multiply code
for(int j = 0; j < rozmer; j++)
for (int k = 0; k < rozmer; k++)
float temp = 0;
for (int m = 0; m < rozmer; m++)
temp = temp + matice1[j,m] * matice2[m,k];
matice3[j, k] = temp;
Edit: 1027x1027 - 10 seconds 2049x2049 - 91 seconds... Iam really confused now. 2500x2500 - 166 seconds