I have a draft at https://github.com/cubing/twsearch/compare/lgarron/TargetPatternCache but it will take some design work because:
- I don't want
SemiGroupActionPuzzle to require Pattern: Hash (since it's not needed when searching for a single target).
- I don't want an automatic fallback to a slower method when
Pattern: Hash is not implemented.
Note that Rust doesn't have negative traits, so we can implement where TPuzzle:Pattern: Hash but not where TPuzzle:Pattern: !Hash. We can hang this off of SearchOptimizations if we need, but it needs to interoperate with HashPruneTable and I'm worried that adding even more type constraints to the codebase to make this work would confuse everyone other than me.