Mail Archives: djgpp/2000/04/17/20:54:51
"Alexei A. Frounze" wrote:
> Well, let me tell some words in conclusion. ;)
>
> 1. You simply proved that GCC has an optimizer efficient enough. Okay, I agree.
> Your code that works 2 FPS fater for you works the same for me as before. I
> think it doesn't mean faster than mine (just 2.9%).
> So, we have a good optimizer and you proved this. Great. I'm glad. This means I
> can throw away a lot of inline ASM now.
>
> 2. If I knew that (int)(x) is slow and if I had proper manual on inline ASM, I
> would achived the same but with less problems.
>
> 3. Dieter, I hope you won't try to convert span() to plane C. :)
> This replacement doesn't work even nearly fast:
> --------------8<----------------
> while (n--) {
> *scr++ = *(texture+((v1>>8)&0xFF00)+((u1>>16)&0xFF));
> u1 += du;
> v1 += dv;
> };
> --------------8<----------------
>
> Anyway thank you. And btw, thank to myself. If I didn't write efficient C code
> between /* */ :), Dieter would never prove that GCC has a good optimizer because
> he doesn't know the tmapping algorithm (do you?).
And btw, the main trick:
4. The FIDIVRL instruction is executed in parallel with span(). If we remove
this inline code and put C instead, we'll loose performance. It's also a proof
that my inline asm is not a redundant thing. :)
bye.
Alexei A. Frounze
-----------------------------------------
Homepage: http://alexfru.chat.ru
Mirror: http://members.xoom.com/alexfru
- Raw text -