It can be done with two cycles and no additional registers, however: the EXA only stores values between -99, so trying to make it larger than 9999 will clamp it at 9999 (and making it smaller than -9999 will clamp at the other end). This is 3 cycles, 4 instructions, and clobbers T. The naive method of clamping is something like: It might also be worth looking to see if the write can be done earlier. If there are useful things to do in this time even better. If you find an EXA is waiting for a cycle or two before reading M, consider moving the read so it is an instruction or two later. When doing an M read or write, you want to do this as close to the other EXA doing the write or read. (Of course, if the new EXA then shows up too early and messes with orderings, or blocks another EXA that's not so good.) It is worth examining instruction orders, particularly around M read/writes, and REPL instructions.įor example, the earlier an EXA starts work, the earlier it finishes, so if there are instructions before a REPL that could be done after the REPL, it might be worth moving the REPL forward. 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. 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.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |