Speed up a slow loop

Neville Smythe neville.smythe at optusnet.com.au
Tue Mar 8 17:37:01 EST 2022

> On 9 Mar 2022, at 4:00 am,Alex Tweedly wrote:
> Oh, well, if you've got the fast boardwalk code in there anyway, that 
> opens up another possibility (with one caveat).
> The boardwalk will find all valid words on the board. So that list of 
> words can be used as the "dictionary" for the user's guesses - and now 
> you have a "dictionary" of only a few hundred words, rather than than 
> the many thousands of either the original or the filtered dictionaries.
Really only a few hundred potential words? My back-of-a-very-small-envelope guesstimate was about 2000.
I’ll be interested to see how many there are, because my envelope isn’t big enough to work it out, and the walking algorithm which I am really impressed can be so fast.

But anyway checking even a few hundred potential words (the vast majority of which would be non-words so the worst case) is going to be slower than checking a much smaller number of mostly valid user candidates. Both can one done in idle time so not a problem I guess.


More information about the use-livecode mailing list