[vorbis-dev] Optimisations

Segher Boessenkool segher at wanadoo.nl
Thu Nov 16 14:45:44 PST 2000



David Riley wrote:
> 
> "David A. Gatwood" wrote:
> >
> > PowerPC 74xx (G4/Altivec) -- but not in assembly.  There are C/C++
> > extensions in gcc (or will be... not sure if they're out in public yet) to
> > make this easier.
> 
> Why not in assembly?  The GCC extensions won't necessarily work across
> platforms (i.e. with the Metrowerks compiler) while it's already
> accepted that assembly doesn't... And (to my mind) it's easier to
> separate two similar assembly files than C files.  Besides, most PPC

Just use some #ifdef's, no big deal. Or two separate src files, you'll need
them for asm as well.

> compilers I've seen perform rather badly on FP multiply-add operations
> in sequence (see <http://oscar.the-rileys.net/programming/assem.html>
> for an example).

MPW (MrC) does a great job (yeah, I did only one test, sorry). Btw, is there
a fused multiply-add in AltiVec? That would make it an absolute ROCKER!

Now for the C vs. assembler stuff:

If I understand correctly, the gcc extensions consist mainly of new datatypes
(like, floats4 or whatever they call it), such that

floats4 a, b, c;
c = a + b;

will do a vector addition. This is a quite natural thing to do, and
doesn't take
much effort to program, while the compiler will probably outsmart about
every asm
programmer (if enough work is put into the compiler).

Groetjes,

Segher

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Vorbis-dev mailing list