help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: stats say SBCL is 78 875 % faster than natively compiled Elisp


From: Chen Zhaoyang
Subject: Re: stats say SBCL is 78 875 % faster than natively compiled Elisp
Date: Tue, 14 Feb 2023 23:04:16 -0600
User-agent: Gnus/5.13 (Gnus v5.13)

Emanuel Berg <incal@dataswamp.org> writes:

> (defun fib (reps num)
>   (let ((z 0))
>     (dotimes (_ reps)
>       (let ((p1 1)
>             (p2 1))
>         (dotimes (_ (- num 2))
>           (setf z (+ p1 p2)
>                 p2 p1
>                 p1 z))))
>     z))

Maybe try out (named-let)? It should be fun to rewrite it with tail
calls.

CZY



reply via email to

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