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

Atari coding BBS
 
Re: CHK/CHK2 instructions
Posted by: Leonard May,11.2005-17:44 

I don't know that game code, but these intructions "may" be usefull for special ultra-optimisation :-) Explain:

In my fast mandelbrot routine, I use the instruction TRAPV. TRAPV flush an exeption if overflow flag is set. If not, it only takes 4 cyles. In a standard mandelbrot set, you have to check an exit condition at each iteration, and generally do 30 to 100 iterations before one and only exit. So using trapv takes only 4 cycles per iterations, instead of 8 for a BVS branch.

Anyway, I don't know the CHK timing instruction but it may be 4 cycles if CHK dn,dn exist. So in a loop where the exit condition does not occur very often ( say a 2d dot clipping routine), CHK may be usefull. ( again, IF it takes 4 cycles. If not, it's useless)








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

Topic Posted by  Date 
CHK/CHK2 instructions Peter May,09.2005-14:53
  Re: CHK/CHK2 instructions mikro May,10.2005-14:25
    Re: CHK/CHK2 instructions Peter May,10.2005-16:31
      Re: CHK/CHK2 instructions mikro May,11.2005-08:55
        Re: CHK/CHK2 instructions earx May,11.2005-10:36
          Re: CHK/CHK2 instructions Leonard May,11.2005-17:44
            Re: CHK/CHK2 instructions Peter May,11.2005-21:51
            Re: CHK/CHK2 instructions earx May,12.2005-09:29
          Re: CHK/CHK2 instructions Peter May,11.2005-21:47


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