In fact I have only studied/modified hclip.c light.c texture.c and especially draw.c
>Is there any part that can optimized by using AltiVec?
Yes but Altivec code is already here
>Is there any complex switches can be replaced table lookups?
Not in the parts I looked
>Is there any loops that can be unrolled?
Already compiled -O3 so pointless (unrolling )
>Is there any useless memory copy operations?
I think no
>Is there any unneeded indirect table lookups.
I think no
>Is there any code that can use macros instead of functions (less braches).
Already compiled -O3 so pointless (inlining)
>Is there any dynamic list that can be replaced by static arrays, normally faster to loop entries when you do not need to step into the list.
Not in the parts I looked
>Is there any integers, that can be replaced by unsigned integers, unsigned integers should be faster I read somewhere.
? dont know
>Is there any malloc() / free(), that are called too often, maybe there is way's workaround it.
Definitely no
>Data being uneasily being copied as parameters, when they can be global, parameter passing does generate extra store operations.
I think not
>Are there any sort operations that can be made faster.
That is the problem
In fact several operations are not optimal but not used often.
Alain Thellier