[Coco] Color BASIC optimization challenge – scaling

Allen Huffman alsplace at pobox.com
Fri Mar 13 09:30:10 EDT 2020


On Mar 13, 2020, at 12:33 AM, Walter Zambotti <zambotti at iinet.net.au> wrote:
> 
> Try changing the inner loop to remove all calculations like this
> 
> 115 P2=P+32:H2=P+H*32:BK$=STRING$(W,175)
> 120 FOR A=P2 TO H2 STEP 32
> 130 PRINT @A,BK$
> 140 NEXT A
> 
> I believe I chopped 7 seconds off the time.

Nicely done! I’ll be sure to include this tip in the follow up article.

Someone else did that too and it’s a step I hasn’t even thought about. When I discussed numbers in u series it was not even testing math:

https://subethasoftware.com/2017/02/14/optimizing-color-basic-part-5/

Thanks!


More information about the Coco mailing list