Given how slow is to search the regexp `ldr|str` in a large file (where the pipe `|` is the “or” operator), I'm pretty sure regexp matching is not implemented the “right” way, i.e. the simple and fast way described here:

:help NFA
« Vim includes two regexp engines:
1. An old, backtracking engine that supports everything.
2. A new, NFA engine that works much faster on some patterns, possibly slower on some patterns. »

@julm Mm, strange. Even when forcing the use of the NFA engines it remains as slow as before. From what I know of NFAs there should be no perceptible difference betwen `ldr|str` and `ldr`, unless they are implemented in a strange way.

Sign in to participate in the conversation
Functional Café is an instance for people interested in functional programming and languages.