Rust / Julia Comparison Post

I’ve implemented the following optimizations, ranked by the improvement they make:

  1. (This is a bugfix, rather) Concatenation instead of destructive extension of words: allowed_guesses = [words; non_solution_words] (4700 min → 150 min)
  2. Using NTuple{5, UInt8} instead of String to store and rank words (thanks to @GunnarFarneback for the idea) (150 min → 20 min)
  3. Using Int8 for index in the Constraint struct (20 min → 15 min)
  4. 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!.

18 Likes