Re: [linux-audio-dev] Re: Steve Harris' C++ v C benchmark

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] Re: Steve Harris' C++ v C benchmark
From: Steve Harris (S.W.Harris_AT_ecs.soton.ac.uk)
Date: Mon Feb 17 2003 - 11:20:26 EET


On Mon, Feb 17, 2003 at 08:34:10 +0100, Roger Larsson wrote:
> Testing that i have done suggest that you should ALWAYS define the
> architecture of your target. (I have not checked if the example does this
> but it is usually forgot...)
>
> -march=pentium3
> or if you need it to run on older computers
> -mcpu=pentium3
> (see man gcc search for "Intel 386")
>
> And at least use optimization level -O1 (use -O3 to get automatic inlining)

Agreed. I generally use -O6, its not a good idea for general use, but for
small fast plugin code its often the fastest. My full set of flags is:

-O6 -fomit-frame-pointer -fstrength-reduce -funroll-loops
-fmove-all-movables -ffast-math ${MACHINE_SPECIFIC}

I'd be interested to see how this compares with other peoples. I've been
meaning to write a test script that tries all the combinations to find
which produces the fastest code.

The -march, -mcpu flags are the mostimportant (they go in
MACHINE_SPECIFIC), but -ffast-math can help a lot too.

- Steve


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Mon Feb 17 2003 - 11:26:50 EET