|
From: | Paul Eggert |
Subject: | bug#17700: [PATCH] dfa: speed-up for a pattern that many atoms are catenated |
Date: | Fri, 06 Jun 2014 07:25:40 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.5.0 |
Norihiro Tanaka wrote:
BTW, even before make this change, dfamusts is terminated by NUL byte.
Yes, that's right, this patch doesn't affect whether the DFA code works correctly on NUL bytes. There is a performance issue: if the pattern contains NUL bytes the DFA code doesn't operate as efficiently as it will does the pattern contains only non-NUL bytes. But this performance issue is unaffected by the recent change.
It's low priority to fix the performance issue, but if we wanted to fix it among many other things we should use memmem instead of strstr.
[Prev in Thread] | Current Thread | [Next in Thread] |