Oh yeah I missed the “this is how a loop would look”. I would probably do all this by formulating the problem as an integer program. What the author says about pruning can probably be handled by a mixed integer program solver implementing branch-and-bound.
Would this work for other 6502 systems like the Atari 2600? Is it possible to use this together with assembly?
Edit: it misses some obvious optimizations. At the end there is
But that could be simplified to just
From reading the article, It think it was implied that the code example should have been:
That part of the article was about optimizing loops after all.
Oh yeah I missed the “this is how a loop would look”. I would probably do all this by formulating the problem as an integer program. What the author says about pruning can probably be handled by a mixed integer program solver implementing branch-and-bound.