emacs-devel
[Top][All Lists]
Advanced

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

Re: C and Emacs Lisp code parts


From: Eli Zaretskii
Subject: Re: C and Emacs Lisp code parts
Date: Fri, 01 Jul 2016 12:25:34 +0300

> From: Andreas Röhler <address@hidden>
> Cc: Eli Zaretskii <address@hidden>
> Date: Fri, 1 Jul 2016 10:39:26 +0200
> 
> You need a number to believe function running from Emacs Lisp is slower 
> than an implementation in C?

Any Emacs function implemented in C will be run by the Emacs Lisp
interpreter, so the interpreter is always involved, whether you want
it or not, and values need to be converted from their Lisp
representation to the corresponding C representation.  Against this
background of Lisp interpreter calling functions implemented in C, a
reimplementation in Lisp might not be significantly slower in
practical use cases.  Moreover, if the Lisp implementation uses a
different algorithm, it could be even faster.

And then there are functions whose speed doesn't matter at all, like
functions which wait, or interface with slow external devices.

So yes, we need numbers to make rational decisions about this.



reply via email to

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