emacs-devel
[Top][All Lists]
Advanced

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

Re: named-let


From: Stefan Monnier
Subject: Re: named-let
Date: Mon, 11 Jan 2021 17:36:57 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Tomas Hlavaty [2021-01-11 23:27:38] wrote:
> On Mon 11 Jan 2021 at 02:49, Zhu Zihao <all_but_last@163.com> wrote:
>> I think the advice mechanism prevent us to do optimization like TCO and
>> auto inlining.

Actually, no.

We have `defsubst` to declare a function as inlinable (which implies
that things like the advice mechanism won't work reliably on it).
And we can also use approaches like "inline, together with a check that
the function was not advised" for functions which have not been
officially declared as inlinable (such checks are already used in the
native-comp code, IIRC, tho just to use "fast call" rather than do
inlining).

As for TCO, the last time this came up the issue is rather that if we
want to have it, it needs to work for all implementations of ELisp,
whereas all the patches we ever received only addressed the case of
byte-compiled code.

With the advent of the native-compiler, "all implementations" is even
harder to reach, since it means, interpreter, byte-code, and native code.


        Stefan




reply via email to

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