This patch improves performance for input string which doesn't match even the first part of a pattern. Although there is no less effective for grep as it uses a superset of DFA, gawk speeds up about 40%. $ time -p env LC_ALL=ja_JP.eucJP ./gawk '/k/ { print }' ../k (before) real 2.85 user 2.79 sys 0.05 (after) real 1.70 user 1.64 sys 0.06 I think that this improvement should have been performed in bug#17576.