emacs-devel
[Top][All Lists]
Advanced

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

Re: pcase defuns


From: Stefan Monnier
Subject: Re: pcase defuns
Date: Sun, 27 Mar 2022 05:31:11 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

> (defun-pattern fibonacci
>    "Compute the fibonacci sequence."
>     ((0) 0)
>     ((1) 1)
>     ((n)
>       (+ (fibonacci (- n 1))
>            (fibonacci (- n 2)))))

If you go and benchmark this function, you'll see that its
performance sucks even more than the usual naive fibonacci that it
appears to be implementing.


        Stefan




reply via email to

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