![]() |
Tim Davis, Prof. Room E338 CSE Building P.O. Box 116120 University of Florida Gainesville, FL 32611-6120 352/392-1481 email: my last name AT cise.ufl.edu |
The first three plots are on the same machine, just different compilers and OS's.
You can see why I recommend not using the lcc compiler that comes with MATLAB.
In the following plots, the results of sstest2.m are shown. That test computes A*B for all matrices in the UF Sparse Matrix Collection, on an AMD Opteron, where B=A'. This test was done four times, where A and B were made complex by adding an imaginary part with the same nonzero pattern as the real part. The time to compute B=A' was excluded. The x-axis is the time for MATLAB to compute C=A*B, which gives a measure of the problem size. The y-axis of the plots in the first row is the same MATLAB time, divided by the SSMULT time. This shows that SSMULT tends to get faster for larger problems. Each circle is one matrix in the collection. The three red lines are 1.1, 1.0, and 1/1.1, so a circle in within the red lines is a result in which the run time of MATLAB and SSMULT differ by at most 10%. The green lines are 2, 1.5, 1/1.5, and 1/2. So if a circle resides above the top green line, SSMULT is over twice as fast as MATLAB for that matrix. Other than a few matricies, SSMULT is as fast as MATLAB for tiny matrices, and much faster for larger ones. SSMULT tends to be slower for very dense matrices such as computing the square of sparse(rand(2000)), but this will be fixed in the next version.
All plots are log-log.
The second row of plots compare SSMULT with SSMULT_UNSORTED. The latter function is the same as SSMULT, except that the output matrix C is returned with unsorted row indices in its columns. This is a non-standard MATLAB matrix, but many MATLAB operators work just fine on an unsorted matrix. The y-axis is the SSMULT time divided by the SSMULT_UNSORTED time. The x-axis is the same as in the first row of plots (the MATLAB time). Note that SSMULT_UNSORTED is typically faster than SSMULT, which is itself faster than the MATLAB C=A*B.