The current pattern matching algorithm is inefficient, as it repeats a lot of work. The original equality saturation implementation (Peggy) used the Rete algorithm to cache pattern matches, but the implementation seems complicated, so I wrote a simple but expensive version to start out (and so that we can more easily test the Rete implementation once it is written).
The current pattern matching algorithm is inefficient, as it repeats a lot of work. The original equality saturation implementation (Peggy) used the Rete algorithm to cache pattern matches, but the implementation seems complicated, so I wrote a simple but expensive version to start out (and so that we can more easily test the Rete implementation once it is written).