Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It allows you to use another processor to do control flow based on an input, freeing up cpu time. For example, suppose you wanted to emit to DOWN:

   0 if LEFT is <= 0
   UP if LEFT is > 0
So you have two options

   S: MOV LEFT ACC
   JGE E
   MOV 0 DOWN
   MOV UP NIL
   JMP S
   E: MOV UP DOWN
Or you could do this:

   S: JRO LEFT
   MOV UP NIL
   MOV 0 DOWN
   JMP S
   MOV UP DOWN
And left would send 1 if its value is <= 0, or 4 if it's >0. In this case it only saves one cycle for the node under consideration, but it could be a good deal more if the conditional is more involved.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: