[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: trunk r117969: Font-lock `cl-flet*', too.
From: |
Leo Liu |
Subject: |
Re: trunk r117969: Font-lock `cl-flet*', too. |
Date: |
Mon, 29 Sep 2014 07:09:10 +0800 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (CentOS 6.5) |
On 2014-09-28 12:41 -0400, Stefan Monnier wrote:
> I mostly agree, but so far the cl-labels macro is not clever enough to
> generate as efficient code as cl-flet*.
I didn't realise this.
> It would be good to improve cl-labels with some dependency analysis so
> that it can generate just as good code as cl-flet*.
I compare the expansions of these two forms and they look quite similar
to me. What kind of inefficiency do you have in mind?
(cl-labels ((oddp (x)
;; (evenp (1- x))
(and (integerp x) (not (zerop (/ x 2)))))
(evenp (x)
(cl-case x
(0 t)
(t (oddp (1- x))))))
(oddp 13))
(cl-flet* ((oddp (x) (and (integerp x) (not (zerop (/ x 2)))))
(evenp (x)
(cl-case x
(0 t)
(t (oddp (1- x))))))
(oddp 13))
Thanks,
Leo
- Re: trunk r117969: Font-lock `cl-flet*', too., Thien-Thi Nguyen, 2014/09/28
- Re: trunk r117969: Font-lock `cl-flet*', too., Stefan Monnier, 2014/09/28
- Re: trunk r117969: Font-lock `cl-flet*', too.,
Leo Liu <=
- Re: trunk r117969: Font-lock `cl-flet*', too., Stefan Monnier, 2014/09/28
- Re: trunk r117969: Font-lock `cl-flet*', too., Leo Liu, 2014/09/29
- Re: trunk r117969: Font-lock `cl-flet*', too., Leo Liu, 2014/09/29
- Re: trunk r117969: Font-lock `cl-flet*', too., Stefan Monnier, 2014/09/29