[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: point-at-final-line

From: Emanuel Berg
Subject: Re: point-at-final-line
Date: Tue, 30 Jan 2018 15:52:09 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

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

reply via email to

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