New games every week!
Wordlist Upgrade
23rd September 2018  
A minor update to the way Word Ladder is generated, which has sped the whole thing up by a remarkable amount.
What took about 3 or 4 seconds, yesterday, now only takes around 0.2 seconds.
Optimisation is the key!

Technically, instead of checking each and every word in the list, I first ensured the wordlist was properly alphabetised..
Next I jump through the list in groups of 1500 words, until "over", then do a quick sift between the 1500 chunk of words.

This is the "Normal" way to do wordlists, but something I've avoided in the past due to Wildcard functionality. eg, If the word you're looking for is "?abbage", how do you know where to stop?

In case I need wildcard functionality in future, I've left the old code available, but even that could do with some neatening around the edges, possibly converting everything to numbers.. Hmm..

Views 3, Upvotes 1
Foldapuz Blog
New games every week!
Site credits : Jayenkai made this.
(c) Jayenkai 2017 and onwards, site design Rychan. RSS feed
Blog - Wordlist Upgrade - AGameAWeek