hilthacker.blogg.se

Exapunks solutuions
Exapunks solutuions












  1. EXAPUNKS SOLUTUIONS CODE
  2. EXAPUNKS SOLUTUIONS FREE

You may be able to combine some of the work with the copy. It's always worth examining your COPY commands, to see if the copied data has any work done it.

EXAPUNKS SOLUTUIONS FREE

ADDI F 10 X over COPY F X  ADD X 10 X) will also free up space for when you want to trade space for cycles with other optimisations. Reducing instruction count as well as saving cycles (e.g. Many of the tricks to reduce size in the Space Optimisation section are useful here. Fewer instructions (normally) take less time to execute. Excessive bookkeeping: mostly this affects loops and branches.When this is done correctly, the low cycle count is is the second best feeling in the world (right behind seeing the dance you choreographed go correctly).

exapunks solutuions

Sometimes this involves carefully synchronising your EXAs to dance a very precise dance.

  • Blocking conditions generally: if you find that any of these come up, see if you can figure a way to avoid waiting for stuff to clear.
  • This can be true even when your EXAs are well synchronised, since a send down M always takes at least two cycles.
  • Communications: time spent sitting on the M channel to read/write is time spent not doing anything.
  • exapunks solutuions

  • Execution paths: if you have a task that can be done, but no EXA working on it, you could try adding more EXAs.
  • "Find out which values of A between 10 and 29 can have some operation performed on them" could be split into "Can 10 have this operation performed on it?" "Can 11 have this operation performed on it?". Some consideration should be given to how tasks are split up. Some tasks may require others to be completed first. (Opinions may vary.)įor each challenge, split it up into tasks, and handle each task individually. This is, to my mind, the most in depth and satisfying area to optimise. NOTE DROP AND HALT UNNEEDED Cycle optimisation
  • Using Canaries and Terminators can avoid writing clean-up code.
  • MARK takes up space, which may be counter intuitive for some people coming from other languages.
  • MARK END  DROP  HALT is very similar to DIVI X T X
  • A pattern like COPY M X  ADDI X val X can be replaced with ADDI M val X.
  • EXAPUNKS SOLUTUIONS CODE

  • Re-order code so your EXA can just drop into the next section without having to JUMP there.
  • This also applies in places where the EXA would crash trying to go into the next section.
  • DROP  HALT does the same thing as simply HALT.
  • Avoid doing things like DROP  HALT at the end of your file.
  • If you have repeated sections, consider whether you can create a loop, or a unified section to JUMP to.
  • Save a return trip by sending information required back via GLOBAL M, and then dying.
  • Save two jumps through a link by jumping once, and then using a REPL to create your second worker.
  • exapunks solutuions

  • Any time you use a link twice, consider whether it is necessary.
  • Improved cycles performance can often be found using methods that use more space (paradoxically), or more LINKs and KILLs.
  • It may be necessary to sacrifice one metric to help another.
  • exapunks solutuions

  • Watch performance closely, and try to identify wasted cycles / instructions / links.
  • Activity - the number of successful LINKs performed while completing a task.
  • Space - the number of lines of instructions it takes to complete the task.
  • Cycles - the time it takes (in cycles) to complete the task.
  • The level score is given for the worst-case performance. Optimisation is trying to improve one (or more) of the three level metrics (cycles, space, activity). You are recommended to try optimising as best you can without this guide, and then - once you are stuck for ways to find improvements - come back and see what other tricks you can try. You may find it is more fun to discover these strategies for yourself. WARNING: SPOILERS! While no particular solution to any particular puzzle is given here, no guarantee is made that examples aren't very relevant to certain puzzles.














    Exapunks solutuions