Usenet comp.os.linux.alpha (1997-2013)
 help / color / mirror / Atom feed
From: Emil Briggs <briggs@tick.physics.ncsu.edu>
Subject: Re: fast array calculation in C
Date: 1999/10/18	[thread overview]
Message-ID: <380A9C4B.27837CFE@tick.physics.ncsu.edu> (raw)
In-Reply-To: 7ud6gc$2o94@news2.newsguy.com

Greg Lindahl wrote:
> 
> Alex Rhomberg <rhomberg@ife.ee.ethz.ch> writes:
> 
> > > The memcpy() call at the end, on the other hand, is expensive.
> >
> > Did you check that?
> > It isn't (expensive). The compiler inlines it and then does some more
> > optimizations.
> > I get >400 MFLOPS (40% peak) with the memcpy
> 
> Compilers are clever with memcopy, but I've yet to see one that could
> figure out at compile time "hey, the byte count is divisible by 8 and
> the buffers are aligned..." That's why a good compiler will usually do
> a better job of optimizing a copy loop.
> 

The Cray vector compilers were smart enough to do wholesale replacment
of computational loops with calls to had coded assembly language
routines. Even up to the level of BLAS2 calls. I was quite impressed
when I looked at the assembly language output of the compiler and
realized what it was doing.

Regards
Emil



       reply	other threads:[~1999-10-18  4:00 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3809E64D.85BDCAFC@ife.ee.ethz.ch>
     [not found] ` <7ud6gc$2o94@news2.newsguy.com>
1999-10-18  4:00   ` Emil Briggs [this message]
1999-10-18  4:00     ` fast array calculation in C Greg Lindahl
1999-10-18  4:00   ` Alex Rhomberg
1999-10-18  4:00     ` Greg Lindahl
1999-10-18  4:00       ` Alex Rhomberg
1999-10-07  4:00 Alex Rhomberg
1999-10-09  4:00 ` Greg Lindahl
1999-10-11  4:00   ` Alex Rhomberg
1999-10-11  4:00     ` Greg Lindahl
1999-10-11  4:00       ` memore0
1999-10-11  4:00         ` Greg Lindahl
1999-10-12  4:00         ` Alex Rhomberg
1999-10-12  4:00           ` memore0
1999-10-12  4:00             ` Alex Rhomberg
1999-10-12  4:00           ` Eberhard Burr
1999-10-13  4:00             ` Alex Rhomberg
1999-10-13  4:00               ` Robert Harley
1999-10-12  4:00       ` Alex Rhomberg
read-only archive

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