STK 0.8 with PowerPC AltiVec optimizations

STK 0.8 with PowerPC AltiVec optimizations

Postby xeno74 » 30 Mar 2013, 15:00

stk-altivec.jpg
stk-altivec.jpg (53.28 KiB) Viewed 2080 times


I have tried to compile STK with optimizations. But I don't have more speed.

This is what I have done:

{l Code}: {l Select All Code}
export TARGET=powerpc-linux-gnualtivec


{l Code}: {l Select All Code}
export CFLAGS="-mcpu=power4 -mtune=power4 -maltivec -mabi=altivec -fno-strict-aliasing -O2 -pipe"


{l Code}: {l Select All Code}
export CXXFLAGS="${CFLAGS}"


I have compiled all STK dependencies with optimizations:

libogg-1.3.0

libvorbis-1.3.3

fribidi-0.19.5

openal-soft-1.15.1

Environment variables for Irrlicht:

{l Code}: {l Select All Code}
CXXFLAGS += -fexpensive-optimizations -O3 -mcpu=power4 -mtune=power4 -maltivec -mabi=altivec -fno-strict-aliasing -pipe^M


{l Code}: {l Select All Code}
CFLAGS := -O3 -fexpensive-optimizations -mcpu=power4 -mtune=power4 -maltivec -mabi=altivec -fno-strict-aliasing -pipe -DPNG_THREAD_UNSAFE_OK -DPNG_NO_MMX_CODE -DPNG_NO_MNG_FEATURES^M


{l Code}: {l Select All Code}
mkdir cmake_build
cd cmake_build
cmake ..


STK was compiled with all optimizations and optimized libraries. But the speed is the same as the STK package without optimizations.

Any ideas?

My system:

Image
User avatar
xeno74
 
Posts: 356
Joined: 10 Dec 2009, 20:38

Re: STK 0.8 with PowerPC AltiVec optimizations

Postby hiker » 04 Apr 2013, 02:02

xeno74 {l Wrote}:I have tried to compile STK with optimizations. But I don't have more speed.

I don't have experience with AltiVec - but: why would you expect any benefit? You would only notice a difference if the optimisations improve a bottle neck of the game. From what I can deduce the optimisations are related to vectorisation. So even if the code vectorises (which is far from trivial to do), the main bottle neck would be kart animations (which I am reasonable certain does not vectorise well) and graphics, which again is not affected by that.

If you really want to follow this up: first determine the bottle neck on your architecture (which might be different from the bottle necks I usually measure). Then check if anything was optimised at all (enable appropriate compiler messages) in those parts. If not, optimise the code so that it does vectorise. Then see if the optimisations make a difference.

I wouldn't be surprised that most of the STK code (except bullet) is performance-wise so memory bound that it doesn't matter if the code is vectorised or not.

Cheers,
Joerg
hiker
 
Posts: 1435
Joined: 07 Dec 2009, 12:15
Location: Melbourne, Australia

Who is online

Users browsing this forum: No registered users and 1 guest

cron