emacs-devel
[Top][All Lists]
Advanced

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

Re: On elisp running native


From: Andrea Corallo
Subject: Re: On elisp running native
Date: Fri, 06 Mar 2020 17:51:38 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Zhu Zihao <address@hidden> writes:

> Hi Andrea! I noticed that you said type annotation is important for speed. Can
> we do static analysing after macro-expansion to infer types?

Hi Zhu,

yes this is how it works already both for types and values.

> Maybe we can just write types for function arg...

I think just some macro would be required to expand in something like:

(defun foo (x y)
  (let ((x (comp-hint-fixnum y))
        (y (comp-hint-fixnum y)))
    ...))

I suspect somebody could already have some ideas on the subject... :)

That said bare in mind that this is most likely non sufficent to exploit
all possible optimization because you likely want to hint the compiler
that the result of some additions in the body is still a fixnum and does
not overflow in the integers (this is just and example).

For the return value and type currently we don't do interprocedural
analysis but is a good suggestion and should not be hard to add.  That
said I think would be fair to apply it only at speed 3.


  Andrea

-- 
address@hidden



reply via email to

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