updated for version 7.3.988
Problem: New regexp engine is slow.
Solution: Break out of the loop when the state list is empty.
diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c
index ba3a0f4..8a0c261 100644
--- a/src/regexp_nfa.c
+++ b/src/regexp_nfa.c
@@ -2951,6 +2951,11 @@
#ifdef NFA_REGEXP_DEBUG_LOG
fprintf(debug, "\n-------------------\n");
#endif
+ /*
+ * If the state lists are empty we can stop.
+ */
+ if (thislist->n == 0 && neglist->n == 0)
+ break;
/* compute nextlist */
for (i = 0; i < thislist->n || neglist->n > 0; ++i)