best CFLAGS for multimedia on mmx cpu and other optimize questions

best CFLAGS for multimedia on mmx cpu and other optimize questions

Post by Martin Herrm » Fri, 03 Nov 2000 06:27:46



Hi all,

I'm trying to optimize my Linux system as much as possible for running
divx movies. I don't think it's possible with my specs, but I'm an
optimize freak and just want to see how far I get :-)

My specs: toshiba
320 CDT, 32 MB Ram, mobile intel pentium processor with mmx at 233 MHz,
video: Chips & Technologies CT65555 with 2048 kb.

I'm running kernel 2.2.17, xfree 3.3.5, and most recent versions of:
icewm, sdl, smpeg, libaviplay and xtheater. Everything is compiled
manually, except xfree. My questions are:

1. are those the best CFLAGS? -Wall -Wstrict-prototypes -O6 -march=i586
-mcpu=i586 -ffast-math -funroll-loops -fomit-frame-pointer -fforce-mem
-fforce-addr -malign-double -fno-exceptions

2. will it make any difference if i will run xfree 4.x? Should I compile
it with any other cflags than -O3 -march=i586 -mcpu=i586 ?

3. do I need to recompile everything with the best cflags from question 1
again?

4. should i use an other window manager that uses less recources than
icewm? If so, which one?

thanks a lot in advance!

Martin

--
Linux Gebruikers Handleiding v1.2 : http://2mypage.cjb.net
Linux RedHat 6.1 Kernel 2.2.17  Toshiba P233 MHz, 32 Mb RAM
10:20pm up 1 day, 6:02, 3 users, load average: 0.18, 0.37, 0.48
Western Civilization, that would be a good idea!

 
 
 

best CFLAGS for multimedia on mmx cpu and other optimize questions

Post by Juergen Hein » Fri, 03 Nov 2000 07:46:09



>Hi all,

>I'm trying to optimize my Linux system as much as possible for running
>divx movies. I don't think it's possible with my specs, but I'm an
>optimize freak and just want to see how far I get :-)

>My specs: toshiba
>320 CDT, 32 MB Ram, mobile intel pentium processor with mmx at 233 MHz,
>video: Chips & Technologies CT65555 with 2048 kb.

>I'm running kernel 2.2.17, xfree 3.3.5, and most recent versions of:
>icewm, sdl, smpeg, libaviplay and xtheater. Everything is compiled
>manually, except xfree. My questions are:

>1. are those the best CFLAGS? -Wall -Wstrict-prototypes -O6 -march=i586
>-mcpu=i586 -ffast-math -funroll-loops -fomit-frame-pointer -fforce-mem
>-fforce-addr -malign-double -fno-exceptions

[-]
-O6 does the same as -O42 -- nothing -- -O3 is the limit. Avoid -Os
as it can generate false code (I just ran into that one with the latest
glibc version and -O2 proved to be fine as far as it's possible to tell).

-fomit-frame-pointer and -fforce-mem are being enabled by -O2 already
and -fforce-addr on a CPU with such a limited register set as all Intel
compatibles .. I don't know.

Quote:>2. will it make any difference if i will run xfree 4.x? Should I compile
>it with any other cflags than -O3 -march=i586 -mcpu=i586 ?

[-]
I'd use -fno-strength-reduce .. it used to generate a./o. trigger bugs
in the compiler even after it was supposed to be fixed and while opinions
differ I've run some benchmarks myself. In general codesize increases
with strength reduction enabled which is bad while speed does not increase
dramatically and some binaries ran slower. Again all for an Intel CPU.

It's a general problem with all optimisations and for some long running
binaries a runtime profiling based optimisation might be a good approach.
[-]

Ta',
Juergen

--
\ Real name     : Jrgen Heinzl         \       no flames      /


 
 
 

best CFLAGS for multimedia on mmx cpu and other optimize questions

Post by Martin Herrm » Fri, 03 Nov 2000 18:19:35




first of all: thanks for your reply!

Quote:> -O6 does the same as -O42 -- nothing -- -O3 is the limit. Avoid -Os
> as it can generate false code (I just ran into that one with the latest
> glibc version and -O2 proved to be fine as far as it's possible to tell).

> -fomit-frame-pointer and -fforce-mem are being enabled by -O2 already
> and -fforce-addr on a CPU with such a limited register set as all Intel
> compatibles .. I don't know.

Well, I put in -O2 now and removed the unnecessary things. Yesterday night, I
did recompile things with the optimizations flags I had posted before and
things were somewhat faster. I also installed 'DivX ;-) Release 3' at my
Windows partition and Windows runs the DivX files much faster. Should I also
recompile things like glibc, sound things and video things with some more
optimization? I think for example that my glibc version is an i386 rpm.. And
does anyone know if for my card (Chips & Technologies CT65555, 2MB) It would
be faster to upgrade to a newere XFree86? (currently using 3.3.5)

thanks a lot!

Martin

--
Linux Gebruikers Handleiding v1.2 : http://2mypage.cjb.net
Linux RedHat 6.1 Kernel 2.2.17  Toshiba P233 MHz, 32 Mb RAM
10:10am up 1:06, 3 users, load average: 0.24, 0.37, 0.37
Western Civilization, that would be a good idea!

 
 
 

1. CFLAGS: optimize for i586

Dear reader,

I'm building a wine rpm and in the spec file I can easily add some CFLAGS. Now
it says:"-03 -WALL". But I also want the rpm to be optimized for i586 CPU's.
Which option should I add?

much thanks in advance,

Martin

--
Linux Gebruikers Handleiding v1.2 : http://2mypage.cjb.net
Linux RedHat 6.1 Kernel 2.2.14  Toshiba P233 MHz, 32 Mb RAM
5:20pm up 20 days, 10:59, 4 users, load average: 0.41, 0.30, 0.60
Western Civilization, that would be a good idea!

2. (6/8) Eliminate brlock from ipv4

3. Summary of answers: feeding CFLAGS of "make CFLAGS=-g" to sub-makes

4. Changing default hostname?

5. Multimedia, MMx, USB, PnP under Linux

6. smbclient and german ? ? ΓΌ

7. multimedia players or others for solaris x86?

8. Package locations

9. Powerleap PLPRO MMX VRM & 2 MMX P5 200 MHZ WITH S1462 works (Linux)

10. checksumming with mmx, comment in arch/i386/lib/mmx.c

11. X, Netscape crashing after CPU changed to P200 MMX

12. GA586DX with MMX CPUs: Jumpering?

13. Best distro for linux on P233/MMX