Skip to content

Use a HashSet to track target patterns. #127

@lgarron

Description

@lgarron

I have a draft at https://github.com/cubing/twsearch/compare/lgarron/TargetPatternCache but it will take some design work because:

  1. I don't want SemiGroupActionPuzzle to require Pattern: Hash (since it's not needed when searching for a single target).
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions