Research Article

Improved Matrix Multiplication by Changing Loop Order

Table 2

Representation of elements of Matrix C in cache.

Matrix CCache line

C [0][0]C [0][1]C [0][2]C [0][n]Cache line-0
C [1][0]C [1][1]C [1][2]C [1][n]Cache line-1
C [2][0]C [2][1]C [2][2]C [2][n]Cache line-2
C [n][0]C [n][1]C [n][2]C [n][n]Cache line-n