I’ve implemented the following optimizations, ranked by the improvement they make:
- (This is a bugfix, rather) Concatenation instead of destructive extension of
words
:allowed_guesses = [words; non_solution_words]
(4700 min → 150 min) - Using
NTuple{5, UInt8}
instead ofString
to store and rank words (thanks to @GunnarFarneback for the idea) (150 min → 20 min) - Using
Int8
forindex
in theConstraint
struct (20 min → 15 min) - Removing non-
const
globals (no noticeable effect)
Github gist:
https://gist.github.com/vvpisarev/9da868c876ae01ed801ce97d7440218f
The offered choices seem to match those on the author’s website, so it looks like concatenation is what the author did have in mind writing the append!
.