You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now the output instructions are very naive, with no optimizations at all. For fun it might be worth trying out some optimization techniques. For instance, doing a push and a subtract-pop immediately results in the register being set to 0.
It seems easy enough to replace instructions of the form
PUSH_X
SUBTRACT_X
where X is either LEFT or RIGHT, with something like
RESET_REGISTER
where RESET_REGISTER sets the register value to 0.
I am sure other optimizations could be made as well.
The text was updated successfully, but these errors were encountered:
Right now the output instructions are very naive, with no optimizations at all. For fun it might be worth trying out some optimization techniques. For instance, doing a push and a subtract-pop immediately results in the register being set to 0.
It seems easy enough to replace instructions of the form
where
X
is eitherLEFT
orRIGHT
, with something likewhere
RESET_REGISTER
sets the register value to 0.I am sure other optimizations could be made as well.
The text was updated successfully, but these errors were encountered: