-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Description
With Regex, we already had public API that only needed to know whether a match existed but no additional information about it (IsMatch). And #67794 added new public API that needs to know the bounds of the match, but not the full capture information from it. The NonBacktracking engine has to exert additional energy in computing capture information, so rather than just passing through a Boolean "quick" to the engine, it could be helpful to pass through an enum that would allow NonBacktracking to avoid the more expensive "compute captures" path if they won't be used anyway. Additionally, that information could make Tidy cheaper, as it needn't iterate through all captures fixing up their bounds nor balancing groups if capture information is going to be ignored.