Re: Matrix Multiplication



On 2008-01-03 15:32:08 -0400, Evgenii Rudnyi <usenet@xxxxxxxxx> said:

Hello,

I have written an introductory text about matrix multiplication where
I compare the performance in NumPy, Fortran, C, and C++. The direct
(naive) implementation is compared with ATLAS.

http://matrixprogramming.com/MatrixMultiply/

Your comments are welcome.

Best wishes,

Evgenii Rudnyi

If one were looking at this like a referee one would be questioning an
author who seems to like to use a 30 year old version of Fortran.
There are three revisions since 1977. Fortran 90 introduced a lot
of matrix operations which are never mentioned. The G77 compiler has
not been supported for several years.

When an author goes out of the way to "think old" one wonders how much
of the rest of the material has the same attributes.

Both a good implementation of an interpreter and of Fortran 90 are free
to use the best available subroutine libraries for their purposes. The
GNU successor to G77 may or may not have reached the maturity of using
a highly optimized run time for matrix multiply. Since it is developed
by volunteers one can hardly criticize it for such a lapse when its
major achievement is that it is available at zero cost on many platforms.
Optimization is not its strong point and what is there is because of
work directed at other languages in the GCC language family.

There is also the question of the intended audience for an introductory
text and whether that audience should be treated to content which is so
dated. In a fast skim I noticed some comments on memory issues. I did not
notice comments on the issues of size scaling when the matrix fits in the
cache memory and when it does not. When it does not then is the issue of
subscript order that may or may not be cache friendly. The advice that
good subroutine packages deal with such issues is good. One would like
some indication of the problem they address even if the full technical
nature of the solution is not given. Keeping such a discussion both
accurrate and introductory is not easy.

Fortran 77 is important to know because of the large amount of excellent
developed software that is available. But it should be recognized for what
it is. It is a marvelous legacy foundation but there has been progress.

There even are some who argue that the array features for F90 are such that
they prefer to use it over things like MatLab as it does not suffer as severe
of performance penalties on "other" programming with the same compactness and
convenience of the interpreter. Such assessments would strongly depend on
the mix of applications.









.



Relevant Pages

  • Matrix Multiplication
    ... I have written an introductory text about matrix multiplication where ... I compare the performance in NumPy, Fortran, C, and C++. ...
    (sci.math.num-analysis)
  • Re: Language efficiency of C versus FORTRAN et al
    ... > efficient as FORTRAN, eg for matrix multiplication, because a C ... > compiler cannot make the assumptions about arrays that a FORTRAN ... choose an algorithm which is more awkward in one language than the other. ...
    (comp.lang.c)
  • Re: Language efficiency of C versus FORTRAN et al
    ... > efficient as FORTRAN, eg for matrix multiplication, because a C ... > compiler cannot make the assumptions about arrays that a FORTRAN ... Fortran compilers have been optimised for SIMD architectures eg Cray ...
    (comp.lang.c)
  • Re: Matrix Multiplication
    ... author who seems to like to use a 30 year old version of Fortran. ... notice comments on the issues of size scaling when the matrix fits in the ... subscript order that may or may not be cache friendly. ... accurrate and introductory is not easy. ...
    (sci.math.num-analysis)
  • Re: Matrix Multiplication
    ... author who seems to like to use a 30 year old version of Fortran. ... subscript order that may or may not be cache friendly. ... accurrate and introductory is not easy. ...
    (sci.math.num-analysis)