--- Comment #14 from jeff at thecreems dot com 2006-10-23 23:50 ---
(In reply to comment #1)
> Created an attachment (id=12473)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12473&action=view) [edit]
> Source code and very simple build script for Ada and FORTRAN code capable of
> s
--- Comment #13 from laurent at guerby dot net 2006-10-22 21:55 ---
Indeed :)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29543
--- Comment #11 from laurent at guerby dot net 2006-10-22 20:55 ---
My point is that the subprogram I wrote is probably the way most Ada
programmers will write when they want to multiply matrices (if not using
BLAS/Lapack).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29543
--- Comment #12 from ebotcazou at gcc dot gnu dot org 2006-10-22 21:27
---
> My point is that the subprogram I wrote is probably the way most Ada
> programmers will write when they want to multiply matrices (if not using
> BLAS/Lapack).
OK, but you have not simplified the problem in do
--- Comment #10 from ebotcazou at gcc dot gnu dot org 2006-10-22 18:33
---
> I don't know how to write the equivalent fortran code, but it's likely better
> to concentrate on the subprogram version for optimization purpose.
Sorry, I don't see your point.
--
http://gcc.gnu.org/bugz
--- Comment #9 from laurent at guerby dot net 2006-10-22 16:13 ---
Eric, build is "i686-pc-linux-gnu" I don't understand why you speak of
generalization :).
Anyway, I changed the code to match more likely use, that is by using a
subprogram:
procedure Compute (A, B : in Real_Matrix;
--- Comment #8 from jeff at thecreems dot com 2006-10-22 15:50 ---
(In reply to comment #7)
> > No, but there is an obvious one why the Fortran version trounces the Ada
> > version. Let's not compare apples with oranges.
>
> The adverse effect of the indirection can be alleviated thoug
--- Comment #7 from ebotcazou at gcc dot gnu dot org 2006-10-22 15:03
---
> No, but there is an obvious one why the Fortran version trounces the Ada
> version. Let's not compare apples with oranges.
The adverse effect of the indirection can be alleviated though:
N : Positive := Po
--- Comment #6 from ebotcazou at gcc dot gnu dot org 2006-10-22 12:42
---
> Eric, if the type is Long_Float your solution will be much worse since the
> alignement on the stack of the matrices will be 4-bytes so you have 50% chance
> the code will be N times slower (when not 8-bytes ali
--- Comment #5 from laurent at guerby dot net 2006-10-22 12:04 ---
Eric, if the type is Long_Float your solution will be much worse since the
alignement on the stack of the matrices will be 4-bytes so you have 50% chance
the code will be N times slower (when not 8-bytes aligned).
So in
--- Comment #4 from ebotcazou at gcc dot gnu dot org 2006-10-22 06:45
---
> The test case that has been attached shows a FORTRAN and Ada program that are
> equivalent (within their matrix multiply loop). The Ada one runs about 2x
> slower with about 3x the number of machine instructions
11 matches
Mail list logo