optimized openal.so = more speed
Carsten Weinhold
news.cw at gmx.net
Wed Oct 9 12:38:17 EDT 2002
Hi folks!
Since I wasn't really satisfied with the game speed, I made some tuning
experiments. Of course I tweaked my graphics settings, but I also
noticed that reducing the number of audio channnels in UT2003.ini gave
me some extra frames. Unfortunatly there were some sounds missing, when
I played CTF-Magma and so I wondered how to get high frame rates with
many audio channels enabled.
I played a bit with OpenAL, which does the sound for UT2k3. I own a SB
Live! an I use Alsa 0.9. So first compiled a fresh openal.so from
latest CVS with Alsa support enabled. I got a quite impressive
performance boost (15-20%) when playing 32-channel audio, but I also
had some strange noise and crackling. After some investigation I
discovered, that ./configuring OpenAL without --enable-arch-asm solved
this problem.
The result is an openal.so, which was compiled using GCC 3.2.1 for my
AthlonXP with MMX, SSE, 3dnow optimizations. In detail, I called
./configure as follows:
export CC=gcc-3.2
export CFLAGS="-march=athlon-xp -mmmx -msse -m3dnow"
./configure --enable-alsa --enable-paranoid-locks --enable-empty-locks
--enable-optimizations
(I removed the '-march=i686' line in the configure script, it would
cause conflicts with '-marh=athlon-xp')
Just enabling Alsa support instead of using Alsa's OSS emulation (as
with the default openal.so) makes a huge difference. The optimizions do
the rest. When running a botmatch benchmark on Asbestos, I got the
following results:
audio config (32 channels) | FPS | improvement
--------------------------------------------------------------
original openal.so using OSS emulation | 50 | 0%
optimized openal.so using OSS emulation | 53 | 6%
optimized openal.so Alsa | 58 | 16%
no sound at all | 64 | 28%
Benchmarking other cards gives similar results. Since I'm running the
game with quite a lot of CPU power (AthlonXP 1800+ @ 1533 Mhz), people
with less powerful CPUs should get even greater speed boosts.
Happy fragging,
Carsten
My System:
----------
AthlonXP 1800+, 512 MB DDR, GeForce3 Ti200, SB Live! Player 5.1
Linux 2.4.19-ac4, NVidia driver 1.0-3123, Alsa 0.9rc3
More information about the ut2003
mailing list