You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't think I've reported this before, but want it here so I don't forget to look into it:
If we find a floating substr, pick a starting point, and then fail to match, it appears we often search for the floating substr again even when we already know exactly where we'll find it. Here's an example adapted from some C parsing I've been doing:
% perl -Mre=debug -wle '
$s= " foo\n" x 10
. " bar long_string\n";
$s =~ m{^ [ \t]* bar \s+ long_string }xm;
' 2>&1 | grep floating
floating "long_string" at 4..9223372036854775807 (checking floating) stclass ANYOF[\t f] anchored(MBOL) minlen 15
Found floating substr "long_string" at offset 88 (rx_origin now 0)...
Found floating substr "long_string" at offset 88 (rx_origin now 8)...
Found floating substr "long_string" at offset 88 (rx_origin now 16)...
Found floating substr "long_string" at offset 88 (rx_origin now 24)...
Found floating substr "long_string" at offset 88 (rx_origin now 32)...
Found floating substr "long_string" at offset 88 (rx_origin now 40)...
Found floating substr "long_string" at offset 88 (rx_origin now 48)...
Found floating substr "long_string" at offset 88 (rx_origin now 56)...
Found floating substr "long_string" at offset 88 (rx_origin now 64)...
Found floating substr "long_string" at offset 88 (rx_origin now 72)...
Found floating substr "long_string" at offset 88 (rx_origin now 80)...
I think after the first time we should skip this check until (roughly) rx_origin + min_offset > offset, certainly when max_offset is infinity, but probably always.
Hugo
The text was updated successfully, but these errors were encountered:
I don't think I've reported this before, but want it here so I don't forget to look into it:
If we find a floating substr, pick a starting point, and then fail to match, it appears we often search for the floating substr again even when we already know exactly where we'll find it. Here's an example adapted from some C parsing I've been doing:
I think after the first time we should skip this check until (roughly) rx_origin + min_offset > offset, certainly when max_offset is infinity, but probably always.
Hugo
The text was updated successfully, but these errors were encountered: