comp.lang.ada
 help / color / mirror / Atom feed
* Matrix Multiplication
@ 1999-12-14  0:00 William Dale
  1999-12-14  0:00 ` Gautier
                   ` (5 more replies)
  0 siblings, 6 replies; 41+ messages in thread
From: William Dale @ 1999-12-14  0:00 UTC (permalink / raw)


OK, 
I was challenged by one of my co-workers - a control and guidance type -
not a real software engineer. 

His claim  : "Fortran is faster doing floating point multiplication than
Ada" 

I could not get any other specifications such as hardware, particular
compiler, version, vendor, special math libraries or any other
equivocations.  Just he 
claims the above in all cases. 

So could I get some help getting times for a Matrix inversion on a 50X50
flotaing point matrix in both languages.  Anyone already done these
types of tests? Any sugestions on special libraries that he may not know
about to do such things in Ada. Obviously he has the Fortan side nailed. 

I know it is silly but this is the kind of FUD that gets thown around
all the time.  Either language could win - it depends on many of the
above issues.  

Thanks!
Bill Dale
mailto:william.dale.jr@lmco.com




^ permalink raw reply	[flat|nested] 41+ messages in thread
* RE: Matrix Multiplication
@ 1999-12-15  0:00 Carlisle, Martin
  1999-12-15  0:00 ` Mario Klebsch
                   ` (2 more replies)
  0 siblings, 3 replies; 41+ messages in thread
From: Carlisle, Martin @ 1999-12-15  0:00 UTC (permalink / raw)
  To: comp.lang.ada

The idea that matrix multiplication would always be inlined seems absurd to
me.  The simple implementation has O(n^3) running time.  Any enhancement
requires a fair amount of code, which I surely wouldn't want replicated
every time I did a matrix multiply.  The overhead of a function call, in
this case, would be so small as to be negligible.

--Martin

----------------------------------------------
Martin C. Carlisle, PhD
Assistant Professor of Computer Science
US Air Force Academy
DISCLAIMER:  This message represents the author's opinions, and not
necessarily those of the US Air Force Academy or the US Air Force. 

-----Original Message-----
From: Richard Maine [mailto:maine@qnet.com]
Sent: Tuesday, December 14, 1999 8:25 PM
To: comp.lang.ada@ada.eu.org
Subject: Re: Matrix Multiplication


"E. Robert Tisdale" <edwin@netwood.net> writes:

> That's even easier.  The Ada version could call the f90 intrinsic too.
> All you would need to do is link the f90 library which contains matmul.

I will not get into the language comparison or benchmarking aspects of
this thread.

I just note that "linking the f90 library that contains matmul" isn't
necessarily that straightforward.  Matmul is an intrinsic.  It is not
at all given  that there even *IS* a library that contains it; a compiler
is quite free to always do it inline.  And even if much of the work is
in a library routine, the interface to them isn't necessarily known
outside of the compiler.

Intrinsics are basically part of the compiler internals.  They *MAY* be
implemented with callable library routines, but there is no guarantee of
that.
And it certainly isn't a portable way to call them.

-- 
Richard Maine
maine@qnet.com

_______________________________________________
comp.lang.ada mailing list
comp.lang.ada@ada.eu.org
http://ada.eu.org/cgi-bin/mailman/listinfo/comp.lang.ada







^ permalink raw reply	[flat|nested] 41+ messages in thread
* RE: Matrix Multiplication
@ 1999-12-16  0:00 Carlisle, Martin
  1999-12-16  0:00 ` Howard W. LUDWIG
  0 siblings, 1 reply; 41+ messages in thread
From: Carlisle, Martin @ 1999-12-16  0:00 UTC (permalink / raw)
  To: comp.lang.ada

Suppose you have such a machine (wow! talk about complex instruction sets!).
I then grant that any good Fortran compiler would use it.  However, it also
follows that any Ada compiler could create a small function to use it (e.g.
using Machine code insertions), and then pragma Inline that function.

--Martin

-----Original Message-----
From: mario@klebsch.de [mailto:mario@klebsch.de]
Sent: Wednesday, December 15, 1999 11:01 AM
To: comp.lang.ada@ada.eu.org
Subject: Re: Matrix Multiplication


"Carlisle, Martin" <Martin.Carlisle@usafa.af.mil> writes:

>The idea that matrix multiplication would always be inlined seems absurd to
>me.  The simple implementation has O(n^3) running time.

What about compiling for a CPU, that does have an instruction for
matrix multiplication? It seems absurd to me, not to use that
instruction, if it is available.

73, Mario
-- 
Mario Klebsch						mario@klebsch.de

_______________________________________________
comp.lang.ada mailing list
comp.lang.ada@ada.eu.org
http://ada.eu.org/cgi-bin/mailman/listinfo/comp.lang.ada







^ permalink raw reply	[flat|nested] 41+ messages in thread
[parent not found: <637de084-0e71-4077-a1c5-fc4200cad3cf@googlegroups.com>]

end of thread, other threads:[~2012-08-07  7:35 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-12-14  0:00 Matrix Multiplication William Dale
1999-12-14  0:00 ` Gautier
1999-12-15  0:00   ` Gautier
     [not found]   ` <5l1f5s4kck891a2s6o8bhvkirm4q79hm6c@4ax.com>
1999-12-15  0:00     ` Gautier
1999-12-15  0:00       ` Marin D. Condic
1999-12-15  0:00         ` Ted Dennison
1999-12-15  0:00           ` Gautier
1999-12-15  0:00             ` Tucker Taft
1999-12-16  0:00             ` Ted Dennison
1999-12-16  0:00             ` Ted Dennison
1999-12-15  0:00         ` Gautier
1999-12-16  0:00           ` Marin D. Condic
1999-12-27  0:00             ` Jeffrey L Straszheim
1999-12-14  0:00 ` David C. Hoos, Sr.
1999-12-15  0:00 ` Greg Lindahl
1999-12-15  0:00   ` Preben Randhol
1999-12-15  0:00 ` Ted Dennison
1999-12-15  0:00   ` William B. Clodius
1999-12-15  0:00     ` Ted Dennison
1999-12-15  0:00       ` William B. Clodius
1999-12-16  0:00         ` Robert A Duff
1999-12-16  0:00           ` William B. Clodius
1999-12-15  0:00 ` E. Robert Tisdale
     [not found]   ` <3856FD3F.8291A71C@ucar.edu>
1999-12-15  0:00     ` E. Robert Tisdale
1999-12-14  0:00       ` Richard Maine
     [not found] ` <01bf4708$99ef98f0$022a6282@dieppe>
1999-12-15  0:00   ` Gautier
1999-12-15  0:00   ` Robert A Duff
1999-12-15  0:00     ` Marin D. Condic
1999-12-16  0:00     ` Pascal Obry
1999-12-16  0:00       ` Greg Martin
1999-12-16  0:00       ` Brian Rogoff
1999-12-16  0:00     ` Dieter Britz
  -- strict thread matches above, loose matches on Subject: below --
1999-12-15  0:00 Carlisle, Martin
1999-12-15  0:00 ` Mario Klebsch
1999-12-19  0:00   ` Robert Dewar
1999-12-19  0:00 ` Robert Dewar
1999-12-19  0:00 ` Robert Dewar
1999-12-16  0:00 Carlisle, Martin
1999-12-16  0:00 ` Howard W. LUDWIG
     [not found] <637de084-0e71-4077-a1c5-fc4200cad3cf@googlegroups.com>
2012-07-10  8:39 ` Does Ada need elemental functions to make it suitable for scientific work? Nasser M. Abbasi
2012-07-10  9:07   ` Dmitry A. Kazakov
2012-07-12  0:31     ` robin.vowels
2012-07-12  7:12       ` Dmitry A. Kazakov
2012-07-29 13:39         ` Robin Vowels
2012-07-29 14:22           ` Dmitry A. Kazakov
2012-07-29 20:54             ` glen herrmannsfeldt
     [not found]               ` <apib1897s56dkultqmfl3emvk1os3tfdak@invalid.netcom.com>
2012-07-30  4:15                 ` glen herrmannsfeldt
     [not found]                   ` <nfhd181tv9u87mcqfb7rgd8lm48ihr9f4r@invalid.netcom.com>
2012-07-31  8:53                     ` MATRIX MULTIPLICATION Robin Vowels
2012-07-31  9:05                       ` Robin Vowels

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox