Closed bbugh closed 2 years ago
Hello Brian, thank you for letting me know about this. I've been already aware of the fact that the DFA minimization algorithm is slow for a large amount of input strings. I will try to improve the algorithm's performance or at least implement a switch that allows to disable DFA minimization. grex won't produce the shortest regex then but it will perform much faster.
Hi! 👋🏻 I thought this may be useful. I came across grex looking at Rust tools and thought I'd try it on an old problem. I'm not planning to use it for anything currently, but I thought this report might be useful.
A file with 3622 lines takes frak (clojure) ~100ms to produce a regex.
Grex takes around 50 seconds on the same list:
Here's
names.txt
:https://gist.github.com/bbugh/4bf9df86931a94f89e61b3b3896d4e62