Mail Archives: djgpp/2000/04/14/03:23:13
Dieter Buerssner wrote:
>
> Alexei A. Frounze wrote:
>
> I have not said, that the plain C code would be faster or slower.
> I just asked a question, that may be not to difficult to answer
> for you, because the C code is already there, in comments.
Not really. Actually, my ASM code improves the performance greatly. And I can't
copmare ASM vs optimized plain C because GCC/AS doesn't compile the source with
-O2 switch.
> Not here. When compiling your code with gcc -O -S (gcc 2.95.2),
> for the interesting lines
> So, this happens to produce correct code, even if the inline
> assembly is wrong, as I explained in another post.
...
> If I use the C code, that is cited above, the output is
> the following:
>
> movl -132(%ebp),%ebx
> subl %edi,%ebx
> movl -136(%ebp),%edx
> subl %esi,%edx
> sarl $4,%ebx
> sarl $4,%edx
>
> So, which do you think is more efficient?
:)
But -O is not enough for me. ;) I still need -O2.
thanks
Alexei A. Frounze
-----------------------------------------
Homepage: http://alexfru.chat.ru
Mirror: http://members.xoom.com/alexfru
- Raw text -