I don’t know if it was particularly fast (I doubt it), and it wasn’t intended as general purpose regex engine, but a few years ago I made a basic regex -> NFA -> DFA library. I was mainly doing it to teach myself Haskell and refresh on automata theory, so it’s probably not the greatest code, but still may be relevant.
To add to this: The problem with the classical approach is that DFA’s can become exponentially large. Most general purpose regex engines I know eschew the classical approach for that reason. GNU grep, for example, builds the DFA lazily.
[Comment removed by author]
It’s not yet released as a library, but check out the code on the linked slides.
[Comment removed by author]
I don’t know if it was particularly fast (I doubt it), and it wasn’t intended as general purpose regex engine, but a few years ago I made a basic regex -> NFA -> DFA library. I was mainly doing it to teach myself Haskell and refresh on automata theory, so it’s probably not the greatest code, but still may be relevant.
https://github.com/jl2/Compiler-Algorithm-Code/tree/master/haskell
There’s a slightly more full featured Python version in the same repo, up a directory.
To add to this: The problem with the classical approach is that DFA’s can become exponentially large. Most general purpose regex engines I know eschew the classical approach for that reason. GNU grep, for example, builds the DFA lazily.