On Wed, Mar 15, 2017 at 10:52 PM, Stefan Monnier wrote: > Yes, it's normal: the "search" attempts a "match" from every whitespace. > So if you have N consecutive whitespace chars in the middle of line, > that gives you N attempts to "match" and every attempt takes O(N) steps > to find that the end of the whitespace is not an LF. > > I don't understand how "\\s-+$" can be significantly faster than > "[\s\t]+$" in this respect. What? I though I said "\\s-+" is *slower* (though only by a factor of 2). Anyway, how about the attached which removes the syntax table stuff.