Skip to content

Improve efficiency of orderless matching #55

Description

@HarrisonGrodin

Currently, orderless matching simply tries all permutations of arguments:

https://github.com/HarrisonGrodin/Rewrite.jl/blob/03af1708d18f17efbc6e604b58c4d4943930607b/src/match.jl#L138-L146

This is clearly inefficient. We should be able to take advantage of the fact that OrderRule will sort all ground terms, thus requiring us only to attempt all possible variable positionings when matching.

Metadata

Metadata

Assignees

No one assigned

    Labels

    improvementImprovement to existing featureperformanceRelated to code speed/performance

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions