[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Emacs-diffs] master c66aaa6: Recomplexify ‘delete-trailing-whitespa
From: |
Noam Postavsky |
Subject: |
Re: [Emacs-diffs] master c66aaa6: Recomplexify ‘delete-trailing-whitespace’ by treating \n as whitespace again |
Date: |
Wed, 15 Mar 2017 23:04:38 -0400 |
On Wed, Mar 15, 2017 at 10:52 PM, Stefan Monnier
<address@hidden> 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.
0001-Simplify-delete-trailing-whitespace-by-dropping-synt.patch
Description: Text Data
- Re: [Emacs-diffs] master c66aaa6: Recomplexify ‘delete-trailing-whitespace’ by treating \n as whitespace again, Stefan Monnier, 2017/03/15
- Re: [Emacs-diffs] master c66aaa6: Recomplexify ‘delete-trailing-whitespace’ by treating \n as whitespace again, Noam Postavsky, 2017/03/15
- Re: [Emacs-diffs] master c66aaa6: Recomplexify ‘delete-trailing-whitespace’ by treating \n as whitespace again, Stefan Monnier, 2017/03/15
- Re: [Emacs-diffs] master c66aaa6: Recomplexify ‘delete-trailing-whitespace’ by treating \n as whitespace again, Noam Postavsky, 2017/03/15
- Re: [Emacs-diffs] master c66aaa6: Recomplexify ‘delete-trailing-whitespace’ by treating \n as whitespace again, Stefan Monnier, 2017/03/15
- Re: [Emacs-diffs] master c66aaa6: Recomplexify ‘delete-trailing-whitespace’ by treating \n as whitespace again, Noam Postavsky, 2017/03/15
- Re: [Emacs-diffs] master c66aaa6: Recomplexify ‘delete-trailing-whitespace’ by treating \n as whitespace again, Stefan Monnier, 2017/03/15
- Re: [Emacs-diffs] master c66aaa6: Recomplexify ‘delete-trailing-whitespace’ by treating \n as whitespace again,
Noam Postavsky <=
- Re: [Emacs-diffs] master c66aaa6: Recomplexify ‘delete-trailing-whitespace’ by treating \n as whitespace again, Stefan Monnier, 2017/03/15