iter-tools / regex

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

Engine linearization #45

Closed conartist6 closed 2 years ago

conartist6 commented 2 years ago

I realized a few things:

  1. The way I had to traverse the engine data structure was costly.
  2. The structure meant that node.removeWorse() was not actually removing all worse nodes -- specifically those from parent expressions were surviving.
  3. A linear data structure is far, far easier to optimize and brings me in line with what other (sane) regex engines do.