From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.help Subject: Re: point-at-final-line Date: Tue, 30 Jan 2018 15:52:09 +0100 Organization: Aioe.org NNTP Server Message-ID: <86r2q79z6u.fsf@zoho.com> References: <868tckgl1y.fsf@zoho.com> <87vafom6af.fsf@bsb.me.uk> <86r2qcf1h2.fsf@zoho.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1517324020 30573 195.159.176.226 (30 Jan 2018 14:53:40 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 30 Jan 2018 14:53:40 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jan 30 15:53:36 2018 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1egXHr-0007C3-7W for geh-help-gnu-emacs@m.gmane.org; Tue, 30 Jan 2018 15:53:27 +0100 Original-Received: from localhost ([::1]:41677 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1egXJr-0005PR-OU for geh-help-gnu-emacs@m.gmane.org; Tue, 30 Jan 2018 09:55:31 -0500 Original-Path: usenet.stanford.edu!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 22 Original-NNTP-Posting-Host: VFF8n9P1H/v9pfNWKwEKwA.user.gioia.aioe.org Original-X-Complaints-To: abuse@aioe.org Mail-Copies-To: never Cancel-Lock: sha1:uyivRJXDUdhIxN53R8MBN7+gwnw= X-Notice: Filtered by postfilter v. 0.8.2 Original-Xref: usenet.stanford.edu gnu.emacs.help:221768 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:115885 Archived-At: Stefan Monnier wrote: >> (insert (format "\n;; %f" (measure-time >> #'point-at-final-line))) > > This doesn't actually call the function, so > no wonder it will take the same amount of > time no matter which function you pass to it. And if you do it the right way, you don't need a buffer of 100 000 lines or 10 000 iterations: ;; (insert (format "\n;; %f" (measure-time (point-at-final-line-1)))) ;; 0.000154 ;; (insert (format "\n;; %f" (measure-time (point-at-final-line-2)))) ;; 0.000045 ;; (insert (format "\n;; %f" (measure-time (point-at-final-line-3)))) ;; 0.000014 -- underground experts united http://user.it.uu.se/~embe8573