help-gnu-emacs
[Top][All Lists]
Advanced

[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?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]