From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: point-at-final-line
Date: Sun, 28 Jan 2018 22:36:05 +0200 [thread overview]
Message-ID: <83o9ldiuve.fsf@gnu.org> (raw)
In-Reply-To: <86wp01byil.fsf@zoho.com> (message from Emanuel Berg on Sun, 28 Jan 2018 19:59:14 +0100)
> 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?
next prev parent reply other threads:[~2018-01-28 20:36 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-27 1:14 point-at-final-line Emanuel Berg
2018-01-27 1:36 ` point-at-final-line Ben Bacarisse
2018-01-27 1:52 ` point-at-final-line John Mastro
2018-01-27 2:50 ` point-at-final-line Emanuel Berg
[not found] ` <mailman.8058.1517017989.27995.help-gnu-emacs@gnu.org>
2018-01-27 2:56 ` point-at-final-line Emanuel Berg
2018-01-27 3:02 ` point-at-final-line Emanuel Berg
2018-01-27 6:11 ` point-at-final-line Marcin Borkowski
[not found] ` <mailman.8063.1517033499.27995.help-gnu-emacs@gnu.org>
2018-01-27 7:05 ` point-at-final-line Emanuel Berg
2018-01-28 16:06 ` point-at-final-line Stefan Monnier
[not found] ` <mailman.8116.1517155644.27995.help-gnu-emacs@gnu.org>
2018-01-28 18:59 ` point-at-final-line Emanuel Berg
2018-01-28 20:36 ` Eli Zaretskii [this message]
[not found] ` <mailman.8132.1517171769.27995.help-gnu-emacs@gnu.org>
2018-01-29 15:03 ` point-at-final-line Emanuel Berg
2018-01-29 16:04 ` point-at-final-line Eli Zaretskii
[not found] ` <mailman.8177.1517241890.27995.help-gnu-emacs@gnu.org>
2018-01-29 16:40 ` point-at-final-line Emanuel Berg
2018-01-29 17:51 ` point-at-final-line Eli Zaretskii
[not found] ` <mailman.8185.1517248285.27995.help-gnu-emacs@gnu.org>
2018-01-30 2:18 ` point-at-final-line Emanuel Berg
2018-01-30 3:32 ` point-at-final-line Eli Zaretskii
2018-01-30 3:50 ` point-at-final-line Stefan Monnier
[not found] ` <mailman.8212.1517284260.27995.help-gnu-emacs@gnu.org>
2018-01-30 14:52 ` point-at-final-line Emanuel Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83o9ldiuve.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.