[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: point-at-final-line
From: |
Stefan Monnier |
Subject: |
Re: point-at-final-line |
Date: |
Mon, 29 Jan 2018 22:50:09 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
> (defmacro measure-time (&rest body)
> "Measure and return the running time of the code block.
> Not mine: http://nullprogram.com/blog/2009/05/28/"
> (declare (indent defun))
> (let ((start (make-symbol "start")))
> `(let ((,start (float-time)))
> ,@body
> (- (float-time) ,start))))
[...]
> ;; (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.
Stefan
- Re: point-at-final-line, (continued)
- Re: point-at-final-line, Stefan Monnier, 2018/01/28
- Message not available
- Re: point-at-final-line, Emanuel Berg, 2018/01/28
- Re: point-at-final-line, Eli Zaretskii, 2018/01/28
- Message not available
- Re: point-at-final-line, Emanuel Berg, 2018/01/29
- Re: point-at-final-line, Eli Zaretskii, 2018/01/29
- Message not available
- Re: point-at-final-line, Emanuel Berg, 2018/01/29
- Re: point-at-final-line, Eli Zaretskii, 2018/01/29
- Message not available
- Re: point-at-final-line, Emanuel Berg, 2018/01/29
- Re: point-at-final-line, Eli Zaretskii, 2018/01/29
- Re: point-at-final-line,
Stefan Monnier <=
- Message not available
- Re: point-at-final-line, Emanuel Berg, 2018/01/30