linux-assembly.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* hint?
@ 2006-09-14 19:58 Henio Paszczak
  2006-09-14 22:05 ` hint? Marcin Kościelnicki
  2006-09-14 23:19 ` hint? Robert Plantz
  0 siblings, 2 replies; 3+ messages in thread
From: Henio Paszczak @ 2006-09-14 19:58 UTC (permalink / raw)
  To: linux-assembly

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 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-09-14 23:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-14 19:58 hint? Henio Paszczak
2006-09-14 22:05 ` hint? Marcin Kościelnicki
2006-09-14 23:19 ` hint? Robert Plantz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).