Speed up a slow loop

Quentin Long cubist at aol.com
Sat Mar 5 21:36:44 EST 2022


So… a Boggle game. Hm. Seems to me that anything you can do to reduce the number of words you need consider at any given time would be a win. Maybe not a *big* win, but still a win. So perhaps give this idea a shot:

When you create a new board:

-- Make a list of all the letters which *are not* on the board


-- Filter out any word that contains at least one letter on the "not on this board" list

-- Use the thus-reduced wordlist for all purposes as long as the board doesn't change

This would add a bit of overhead to the process of setting up a new board, but if it results in time savings during play, the extra overhead might be worthwhile anyway.



"Bewitched" + "Charlie's Angels" - Charlie = "At Arm's Length" Read the webcomic at [ http://www.atarmslength.net ]! If you like "At Arm's Length", support it at [ http://www.patreon.com/DarkwingDude ].


More information about the use-livecode mailing list