[Top][All Lists]

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

Re: Ideal performance of ELisp

From: Ihor Radchenko
Subject: Re: Ideal performance of ELisp
Date: Sat, 13 Aug 2022 19:58:00 +0800

Philip Kaludercic <philipk@posteo.net> writes:

>> Could it be possible to embed C snippets into lisp functions directly?
>> Similar to assembler snippets in C.
> Inline assembler is usually just pasted verbatim by the C compiler into
> the assembled output, but Lisp if Lisp is interpreted, the best thing I
> can imagine would be the automatic the automatic generation and loading
> of dynamic modules, which considering the call overhead involved would
> rarely be worthwhile for just a "snippet".

I had something like macro in mind.

Say, we got something like:

"C code")

would expand to

#<subr anonymous-C-code>

utilising JIT-compiler we already use for native-comp.

Normally, this would happen at compile time, and we do not need to care
about JIT overheads. Otherwise, JIT-compilation can be used as we
already do.

Of course, this is just an idea. But it could be an extremely useful
feature when we want to beat certain performance bottlenecks and do not
want to change Emacs core every time we need such optimization.

Dynamic modules are not good idea, AFAIU. The communication between
modules and the Elisp machine is very limited.

Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92

reply via email to

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