Usenet comp.os.linux.alpha (1997-2013)
 help / color / mirror / Atom feed
From: Alex Rhomberg <rhomberg@ife.ee.ethz.ch>
Subject: Re: fast array calculation in C
Date: 1999/10/12	[thread overview]
Message-ID: <38039F48.DA6247A9@ife.ee.ethz.ch> (raw)
In-Reply-To: 380360a0.1802565782@news.onramp.net

memore0@yahoo.com wrote:
> 
> On Tue, 12 Oct 1999 09:34:20 +0200, Alex Rhomberg
> <rhomberg@ife.ee.ethz.ch> wrote:
> >No, this is optimized C. I just looked at the assembler to find the
> >parts where the compiler produces bad code and write those differently,
> >but still in C.
> 
> In response to you and Greg, "oops".
> 
> My first thought after that was to wonder why?
> 
> I guess that my practice has pretty much been that if I
> look at the assembly, I change it there and save it as
> such. Obviously this has maintenance implications, but
> for embedded stuff, it's usually "write once, run forever".

There are some differences. To change the assembler efficiently (meaning
I don't just reorder a bunch of instructions but try to eliminate loads
and stores) I'd have to look at a bigger picture (in Assembler). I
optimized by finding bad code and changing that in C so the compiler
makes better code. This takes not too much time, and I still have one
portable code. To do it in Assembler, I'd hve to keep in mind all the
issues about pipeline depth and superscalar instruction (which the
compiler knows about). You normally have a lot less of those in embedded
programming.
I'm not afraid of doing Assembler for e.g. a DSP, but for a superscalar
RISC, I'd only use it for some core things (like the BLAS or math
library)

- Alex



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

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