Problem: The floating-point .d number match and the two ellipsis
matches are slow: each begins with a look-behind, which cannot
be reduced to a fixed first character, so the automatic regexp
engine selects the slower NFA backend for them.
Solution: Force the backtracking engine with %#=1 on those three
patterns; it evaluates the look-behind far more efficiently.
Highlighting is unchanged.
Measured with :syntime over a 40000 line corpus: the three affected rules drop from ~0.13s to ~0.008s (about -93%), which cuts the total syntax parse cost by ~10% (1.85s to 1.65s).
https://github.com/vim/vim/pull/21194
(1 file)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
thanks, nice
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()