Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.forth > #59312
| From | anton@mips.complang.tuwien.ac.at (Anton Ertl) |
|---|---|
| Newsgroups | comp.lang.forth |
| Subject | Re: Forth-94 vs. Forth-2012 FP data (long) |
| Date | 2017-05-15 14:33 +0000 |
| Organization | Institut fuer Computersprachen, Technische Universitaet Wien |
| Message-ID | <2017May15.163301@mips.complang.tuwien.ac.at> (permalink) |
| References | <2017May13.093451@mips.complang.tuwien.ac.at> <2043fde8-1ab2-463d-b873-e62ed82446f1@googlegroups.com> <2017May15.081027@mips.complang.tuwien.ac.at> <a4233da0-6cff-47e5-9239-344a50bf201e@googlegroups.com> |
krishna.myneni@ccreweb.org writes:
>On Monday, May 15, 2017 at 1:41:40 AM UTC-5, Anton Ertl wrote:
>> krishna.....org writes:
>> >However, for the case of hi=3D
>> >ghly efficient floating point matrix multiplication, the most appropriat=
>e c=3D
>> >oding, which is also not particularly hard for this case, is assembly la=
>ngu=3D
>> >age. Forth supports writing and calling words in assembler.
>>=20
>> No, for high-performance matrix multiplication, the most appropriate
>> thing is to call a library routine, despite the anti-library stance
>> frequently espoused here (e.g., '"standard libraries" full of
>> inefficient code to take care of all possible cases, etc.'
>> <yPGdnRKY5J87K4vEnZ2dnUU7-aPNnZ2d@supernews.com>). The people who
>> wrote the matrix multiplication libraries have put months of work
>> based on years of work by others into making these libraries fast.
>> It's unlikely that you or I will do better without putting as much
>> work in. ...
>
>I'm going to restrict my statement to the example you gave here. A word lik=
>e FAXPY is trivial to code in assembler, with the 387 instructions.
That may be the case, but that does not mean that it is the
appropriate thing for "highly efficient floating point matrix
multiplication".
And especially for the 387, the code coming from VFX+Ndp387 is just
the same as what one would write in assembly language. It admittedly
has the loop control problem, but that should not be too hard to solve
if MPE puts their minds to it; I am mystified by the performance
problem of the unrolled version, but then there is no way to tell that
that would not happen with hand-written assembly language.
> If you'=
>re talking about non-trivial numerical computation library routines which t=
>ook months to develop, it is unlikely that they were originally written as =
>Forth source code, but rather in Fortran or C, and would indeed take months=
> of effort to translate and test into Forth source. I have done several suc=
>h translations myself of Fortran source code found on netlib, e.g.
>
>ftp://ccreweb.org/software/kforth/examples/fsl/extras/zwofz.4th
>ftp://ccreweb.org/software/kforth/examples/fsl/extras/jairy.4th
>ftp://ccreweb.org/software/kforth/examples/fsl/extras/bes-jy.4th
No, I am not referring to non-trivial computations, I am referring to
a trivial computation like matrix multiplication. You can code it in
a few lines of Forth, C, or Fortran code, or a few more lines of
assembly language code, but the performance will suck, because it does
not take machine characteristics into account (not even the assembly
version). Because matrix multiplication performance is an important
selling argument (e.g., the supercomputer top 500 is based on matrix
multiplication performance), computer and CPU manufacturers have
people who spend months optimizing it to get the most out of each
specific machine; R. Clint Whaley has been working on ATLAS
(admittedly, not just matrix multiplication, but other linear algebra
software as well) for 20 years, and he is not the only one working on
ATLAS.
- anton
--
M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
New standard: http://www.forth200x.org/forth200x.html
EuroForth 2017: http://www.euroforth.org/ef17/
Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Forth-94 vs. Forth-2012 FP data (long) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-05-13 07:34 +0000
Re: Forth-94 vs. Forth-2012 FP data (long) pahihu <pahihu@gmail.com> - 2017-05-13 11:16 -0700
Re: Forth-94 vs. Forth-2012 FP data (long) pahihu <pahihu@gmail.com> - 2017-05-13 11:49 -0700
Re: Forth-94 vs. Forth-2012 FP data (long) pahihu <pahihu@gmail.com> - 2017-05-13 13:38 -0700
Re: Forth-94 vs. Forth-2012 FP data (long) mhx@iae.nl - 2017-05-13 15:08 -0700
Re: Forth-94 vs. Forth-2012 FP data (long) pahihu <pahihu@gmail.com> - 2017-05-14 00:51 -0700
Re: Forth-94 vs. Forth-2012 FP data (long) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-05-14 07:32 +0000
Re: Forth-94 vs. Forth-2012 FP data (long) mhx@iae.nl - 2017-05-14 02:46 -0700
Re: Forth-94 vs. Forth-2012 FP data (long) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-05-14 14:57 +0000
Re: Forth-94 vs. Forth-2012 FP data (long) krishna.myneni@ccreweb.org - 2017-05-15 19:11 -0700
Re: Forth-94 vs. Forth-2012 FP data (long) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-05-14 08:14 +0000
Re: Forth-94 vs. Forth-2012 FP data (long) Paul Rubin <no.email@nospam.invalid> - 2017-05-13 15:58 -0700
Re: Forth-94 vs. Forth-2012 FP data (long) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-05-14 07:01 +0000
Re: Forth-94 vs. Forth-2012 FP data (long) krishna.myneni@ccreweb.org - 2017-05-14 19:04 -0700
Re: Forth-94 vs. Forth-2012 FP data (long) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-05-15 06:10 +0000
Re: Forth-94 vs. Forth-2012 FP data (long) krishna.myneni@ccreweb.org - 2017-05-15 01:49 -0700
Re: Forth-94 vs. Forth-2012 FP data (long) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-05-15 14:33 +0000
Re: Forth-94 vs. Forth-2012 FP data (long) "HAA" <someone@microsoft.com> - 2017-05-15 13:44 +1000
Re: Forth-94 vs. Forth-2012 FP data (long) Andrew Haley <andrew29@littlepinkcloud.invalid> - 2017-05-15 04:43 -0500
Re: Forth-94 vs. Forth-2012 FP data (long) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-05-15 15:03 +0000
Re: Forth-94 vs. Forth-2012 FP data (long) "HAA" <someone@microsoft.com> - 2017-05-17 00:10 +1000
Re: Forth-94 vs. Forth-2012 FP data (long) pahihu <pahihu@gmail.com> - 2017-05-16 09:04 -0700
Re: Forth-94 vs. Forth-2012 FP data (long) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-05-17 15:54 +0000
Re: Forth-94 vs. Forth-2012 FP data (long) mhx@iae.nl - 2017-05-17 10:29 -0700
Re: Forth-94 vs. Forth-2012 FP data (long) pahihu <pahihu@gmail.com> - 2017-05-17 23:53 -0700
Re: Forth-94 vs. Forth-2012 FP data (long) pahihu <pahihu@gmail.com> - 2017-05-19 02:34 -0700
Re: Forth-94 vs. Forth-2012 FP data (long) Joel Rees <joel.rees@gmail.com> - 2017-05-16 22:48 -0700
Re: Forth-94 vs. Forth-2012 FP data (long) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-05-17 06:51 +0000
Re: Forth-94 vs. Forth-2012 FP data (long) Joel Rees <joel.rees@gmail.com> - 2017-05-17 09:29 -0700
Re: Forth-94 vs. Forth-2012 FP data (long) stephen@mpeforth.com (Stephen Pelc) - 2017-05-17 11:07 +0000
Re: Forth-94 vs. Forth-2012 FP data (long) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2017-05-17 15:02 +0000
csiph-web