3 ms·
The intel compiler update 1 (16.1) was released in late 2015. It is available to download to all who have a license or are beginning a new evaluation. For mat
by drmackay 11y ago
The intel compiler update 1 (16.1) was released in late 2015. It is available to download to all who have a license or are beginning a new evaluation.
For matrices of size 4000x4000 there was significant benefit for blocking the loops - please check the table again. This benefit continues as matrices continue to get larger. I specifically used two different size matrices as examples so that the reader could see that blocking is not a panacea or cure all. So as you point out for the smaller case there was no benefit - I wanted the reader to see that, so I included both data sets. The value of block size varies depending on the matrix size and the cache size of the system you are running on. When the data sets or number of iterations you are running on is relatively small (compared to cache size) the blocking will not provide benefit; don't blindly apply it. The matrix multiply was selected for pedagogical purposes - it is easy to illustrate and easy to explain. I was limited to article length - see the link to the article on finite difference methods for more on value of blocking. If you are really interested in blocking for matrix multiply there many other good articles that go into this in much more detail (and the fastest ones do block into submatrices and perform additional optimizations). (Please note the optimal blocking may be rectangular non square blocks - I did not code the general case.)