Version 1.15 of VitRegex is released
I am hoping this is the last version for a while as I’ve exhausted all optimisation strategies that I can come up with for the time being, but it is April Fools Day, so who knows?
This version fixes two optimisation misses:
- do not do analyseLiteralSuffix when in multiline mode as it is not used as
$ matches line endings not just absolute end. Computing suffix might risk
spuriously clearing literalPrefix when prefix=suffix. While this would not
create a wrong answer it would remove an optimisation and slow things down.
- fixed missed optimisation in analyseFirstCharSet, non-alternating group
section - needed to add one so
x = self.patterns.linkIndex + 1
rather than
x = self.patterns.linkIndex
as the loop was fetching the assertion's closing ) token (type G), which
is *not* in the consuming-token case list hence the correct first
character set was never computed. Note this was a performance miss, not
a correctness bug - the engine still produced correct results, just
without the position-skipping optimisation.