Related articles |
---|
Optimizations in C/C++ code doing matrix multiplications ele1@gmx.ch (H. Ellenberger) (2002-03-22) |
Re: Optimizations in C/C++ code doing matrix multiplications ele1@gmx.ch (H. Ellenberger) (2002-03-31) |
Re: Optimizations in C/C++ code doing matrix multiplications marjan.sterk@ijs.si (2002-03-31) |
Re: Optimizations in C/C++ code doing matrix multiplications mark@marklacey.com (2002-04-06) |
Re: Optimizations in C/C++ code doing matrix multiplications lars.gregersen@it.dk (2002-04-06) |
Re: Optimizations in C/C++ code doing matrix multiplications terryg@qwest.net (Terry Greyzck) (2002-04-07) |
From: | mark@marklacey.com (Mark Lacey) |
Newsgroups: | comp.compilers |
Date: | 6 Apr 2002 23:42:31 -0500 |
Organization: | http://groups.google.com/ |
References: | 02-03-151 02-03-194 |
Keywords: | arithmetic, optimize, comment |
Posted-Date: | 06 Apr 2002 23:42:31 EST |
marjan.sterk@ijs.si (Marjan Sterk) wrote in message news:02-03-194...
> On 22 Mar 2002 21:03:51 -0500, "H. Ellenberger" <ele1@gmx.ch> wrote:
>
> >Which compilers are smart enough to automagically optimize this kind
> >of data acess by introducing hidden pointer variables (in registers)
> >incremented and thus avoiding most multiplications?
I think you'll find that most modern optimizing compilers will do
strength reduction, linear function test replacement, and inducation
variable optimizations to produce fairly good code for matrix
multiplications.
However, you'll probably also find very few compilers that will do
loop interchange & blocking (which can have a dramatic effect on
performance) as well as ones that have support for things like the
restrict keyword of C99 (which would allow the optimizer to assume
that the destination matrix didn't overlap either of the source
matrices if they are passed in as pointer parameters).
Mark Lacey
mark@marklacey.com
[My impression is that Fortran compilers do that kind of stuff, other
languages don't. -John]
Return to the
comp.compilers page.
Search the
comp.compilers archives again.