emacs-devel
[Top][All Lists]
Advanced

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

Re: funcall consing


From: Tomas Hlavaty
Subject: Re: funcall consing
Date: Fri, 31 Dec 2021 17:56:20 +0100

On Fri 31 Dec 2021 at 22:27, LdBeth <andpuke@foxmail.com> wrote:
> Try this:
>
> ```
> (defun bar () (benchmark-run 10 (dotimes (i 100000) (1+ i))))
> (defun foo () (let ((x (lambda (i) (1+ i))))
>   (benchmark-run 10 (dotimes (i 100000) (funcall x i)))))
>
> (byte-compile 'foo)
> (byte-compile 'bar)
>
> (foo)
> (0.054734 0 0.0)
> (bar)
> (0.019939000000000002 0 0.0)
> ```

amazing, thank you!



reply via email to

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