[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: On elisp running native
From: |
Stefan Monnier |
Subject: |
Re: On elisp running native |
Date: |
Mon, 09 Mar 2020 17:06:39 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
> Another question is, polymorphic functions defined by `cl-defmethod` can't be
> native compiled. `cl-defmethod` generates and byte-compile dynamic lambda to
> support runtime multi-dispatch. I' m wondering is that any way to make
> `cl-defmethod` compatible with native-comp,
AFAIK it's not *incompatible*, it's just that the dispatch functions
generated by cl-defmethod stay as byte-compiled, because they're
dynamically generated rather than being written into a .elc file.
There's a lot of room for improvement in this area, but I think it will
inevitably require specific treatment. While the speed of execution of
those dispatch functions is important, the speed with which we can
(re)create them is also important, so a naive approach of passing it to
the native compiler to save into a temp file which we then load is
likely to be too costly in some cases.
Stefan
Re: On elisp running native, Spenser Truex, 2020/03/15