hint?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi.
I've read hint in some magazine that if you are not
using the same registers in following lines new
procesor ( my is quite old PIII(coppermine)600Mhz )
can make commands syumyltaniously ie:

mov %eax,%ebx
mov %ecx,%edx

can be does allmost in the same time. i've check it by
using extremly simple example:

movl $3,%ebx
movl $3,%edx
movl $0b111111111111111111111111111,%ecx

loop:
sall $2,%eax
orl  %ebx,%eax
sall $2,%edi
orl  %edx,%edi
   loop loop

it works ( agains theorem from magazine ) faster then

movl $3,%ebx
movl $3,%edx
movl $0b111111111111111111111111111,%ecx

loop:
sall $2,%eax
sall $2,%edi
orl  %ebx,%eax
orl  %edx,%edi
   loop loop

so what is real answer ?
Secund i'he allways trying not to use moemory becouse
its extremly slow .

nut again if i exchange walue between registers with
using temporary memory:

movl %eax,temp
movl %ebx,%eax,
movl temp,%ebx

it works faster than:

movl %eax,%edx
movl %ebx,%eax,
movl %edx,%ebx

WHY? maybe linux is doing something in the mean time
... ?

amaizing hink is that 

xchgl %eax,%ebx

works slowest :) WHY ?

I realy need time in my programs thats why i'm looking
for any optimalization...

Lukas
 

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
-
To unsubscribe from this list: send the line "unsubscribe linux-assembly" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies]     [Security]     [Linux C Programming]     [Linux for Hams]     [DCCP]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux