Abstract:With the development of computer architecture and the introduction of cache, blocking has been the main method to optimize performance in matrix computing, and the effect of leading dimension becomes important to blocking algorithms' performance. This paper analyzes this effect and how to select leading dimension to improve perofrmance, and compares this method with copy method. This method is applied to matrix multiplication and LU factorization, and the practical results agree with the theoretical analysis.