EXAPUNKS

EXAPUNKS

View Stats:
Difference in performance for NOOP vs LINK
Cycle differences for NOOP vs LINK?

I've been working on the Left Arm mission and I found something that I can't wrap my head around and was hoping someone could explain it to me. When I use a NOOP command to time things my solution uses 63 Cycles. When I delete the NOOP and replace it with a LINK command it goes down to 36 Cycles. Are different commands counted differently when it comes to cycles?

Here is the code i'm using. Don't look if you don't want spoilers.


; XA NOOP 63 Cycles
MARK READ
REPL READ
LINK 800
ADDI #NERV 9949 X
SUBI X 9949 X
NOOP
SUBI X 9879 M

; XA LINK 36 Cycles
MARK READ
REPL READ
LINK 800
ADDI #NERV 9949 X
SUBI X 9949 X
LINK 1
SUBI X 9879 M

; XB The same for both examples
LINK 800
@REP 4
LINK 1
@END
MARK SEEKER
REPL SEEKER
ADDI M 9879 #NERV


Shouldn't a NOOP and a LINK use the same number of cycles? Yet that is the only item that changed between the two. Could someone explain it for me?
Originally posted by Robin:
noop is probably blocking the creation of the next exa by a cycle while link moves it out of the way in time. That would be my guess simply looking at the code and not running it in the puzzle. All command use exactly the same amount of cycles to execute, so it must be blocking something from executing
< >
Showing 1-3 of 3 comments
The author of this thread has indicated that this post answers the original topic.
noop is probably blocking the creation of the next exa by a cycle while link moves it out of the way in time. That would be my guess simply looking at the code and not running it in the puzzle. All command use exactly the same amount of cycles to execute, so it must be blocking something from executing
What an interesting (and effective)solution, you're basically spamming readers and writers to avoid JUMPs and are very efficient.

Having looked at the code in action, Robin is absolutely right. the NOOP blocks the exa's in your host, making them wait an extra cycle (you see that your host itself starts filling up).
Thank your for the observation, you are right the NOOP does block spawning and ads a cycle. I hadn't considered that.
< >
Showing 1-3 of 3 comments
Per page: 1530 50