iter-tools / regex

A streaming regex evaluation engine
MIT License
11 stars 1 forks source link

Optimization: Mutable matchState objects #21

Closed conartist6 closed 3 years ago

conartist6 commented 3 years ago

Right now I always create a new matchState object every time I change anything about the state, but I think that is a tremendous waste. I can clone the matchState object in expression and repeat matchers and then changing the objects will be safe.