Dead Hackers Society
Other BBSes »
 
 
Demoscene  Coding  CT60  Buy/sell

Atari coding BBS
 
optimize me!
Posted by: PeP Mar,11.2010-00:55 

Hi,

I have an inner loop which looks like this:

loop:
move.b (a3)+,d7
move.w d7,6(sp)
move.l 4(a2,d7.l*8),a0
move.l 0(a2,d7.l*8),a2
jsr (a0)
dbra d2,loop

I suppose I could re-shuffle my lookup table, and change it to something like this, but I don't know if it's faster:

loop:
move.b (a5)+,d7
move.w d7,6(sp)
lea (a3,d7.l*8), a4
movem.l (a4),a2-a3
jsr (a2)
dbra d2,loop

Any ideas?

Notes:
- target system is 020-060
- unrolling is probably no option
- I have to put d7 on the stack the way I do (calling a C function)
- d0-d1/a0-a1 might get clobbered by the subroutine I call (C)







[All messages in this thread]    [Start new thread]

Topic Posted by  Date 
optimize me! PeP Mar,11.2010-00:55
  Re: optimize me! PeP Mar,11.2010-01:28
  Re: optimize me! mikro Mar,11.2010-10:09
    Re: optimize me! sqward Mar,11.2010-11:58
      Re: optimize me! PeP Mar,11.2010-14:32
    Re: optimize me! PeP Mar,11.2010-14:31
    Re: optimize me! PeP Mar,11.2010-14:44
      Re: optimize me! sqward Mar,11.2010-15:50
        Re: optimize me! PeP Mar,11.2010-16:05
          Re: optimize me! Alien / ST-CNX Apr,15.2010-04:48


Reply to this message
Name:
Topic:
Anti-troll code:

Message:

What's the anti-troll code?
That's your personal code to be able to add comments and messages on the dhs.nu site.
Don't have a code or forgot it? Fix it here.
© 1994-2024 Dead Hackers Society Contact: Anders Eriksson