Patch#17230 causes slowdown for a case to repeat failure in DFA after success in kwset, although it improves the performance for many cases. In fact, the master without this patch is 3.5x slower than grep 2.18 for below. $ yes abcdabc | head -50000000 >k $ env LC_ALL=C time -p src/grep -i 'abcd.bd' k This patch fixes the degradation of the performance for such cases. See the commit log for details. Norihiro