emacs-devel
[Top][All Lists]
Advanced

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

Re: Temporarily select-window, without updating mode-line face and curso


From: Eli Zaretskii
Subject: Re: Temporarily select-window, without updating mode-line face and cursor fill?
Date: Wed, 05 May 2021 14:54:02 +0300

> From: Stefan Kangas <stefankangas@gmail.com>
> Date: Tue, 4 May 2021 19:49:25 -0500
> Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org
> 
> Stefan Monnier <monnier@iro.umontreal.ca> writes:
> 
> > We really should simply speed up `line-number-at-pos`.
> > It shouldn't be hard.  See below what I do in nlinum.el.
> 
> Interesting, it seems much faster at least in this simplistic test:
> 
>     (benchmark-run 100000 (line-number-at-pos))
>     => (5.868677411999999 0 0.0)
> 
>     (benchmark-run 100000 (line-number-at-pos))
>     => (0.9772498589999999 1 0.5954873589998897)

Doesn't this measure the line number of the same position?  If so,
that's about as favorable benchmark for caching as possible, no?



reply via email to

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