[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: point-at-final-line
From: |
Eli Zaretskii |
Subject: |
Re: point-at-final-line |
Date: |
Sun, 28 Jan 2018 22:36:05 +0200 |
> From: Emanuel Berg <moasen@zoho.com>
> Date: Sun, 28 Jan 2018 19:59:14 +0100
>
> Stefan Monnier wrote:
>
> >> Seems to be virtually no difference
> >> in performance.
> >
> > Try them in a very large buffer.
>
> How large is very large? I wrote the below zsh
> to create large files that look like this:
>
> 1f6920fd18f25904026c59ee560f53c815dde2f854e21e40ceb3f3d58fa55ab9
> 593bc90bcecd16dada33273deb2a79e593703844ccc65a2139928124357c7755
> d43d005aeb2bd1b68e264918f99e41aa175b7a9354a171631db0038c68c59f46
> 09eab885d64735c3fcd49d650cf1d237025faf9e40ae356017c07fab9db2005c
>
> With 10 000 lines there was still no
> difference. With 100 000 lines and a file size
> of 6.2M, the results were... identical.
Yes, counting lines is fast. But not counting lines is even faster.
You don't need to compute the number of the current line, you just
need to establish whether the line current ends at EOB. Right? And
the line's end is given by line-end-position, right?
- point-at-final-line, Emanuel Berg, 2018/01/26
- Re: point-at-final-line, Ben Bacarisse, 2018/01/26
- Message not available
- Re: point-at-final-line, Stefan Monnier, 2018/01/28
- Message not available
- Re: point-at-final-line, Emanuel Berg, 2018/01/28
- Re: point-at-final-line,
Eli Zaretskii <=
- Message not available
- Re: point-at-final-line, Emanuel Berg, 2018/01/29
- Re: point-at-final-line, Eli Zaretskii, 2018/01/29
- Message not available
- Re: point-at-final-line, Emanuel Berg, 2018/01/29
- Re: point-at-final-line, Eli Zaretskii, 2018/01/29
- Message not available
- Re: point-at-final-line, Emanuel Berg, 2018/01/29
- Re: point-at-final-line, Eli Zaretskii, 2018/01/29
- Re: point-at-final-line, Stefan Monnier, 2018/01/29
- Message not available
- Re: point-at-final-line, Emanuel Berg, 2018/01/30