emacs-devel
[Top][All Lists]
Advanced

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

Ideal performance of ELisp (was: Why tree-sitter instead of Semantic? (w


From: Stefan Monnier
Subject: Ideal performance of ELisp (was: Why tree-sitter instead of Semantic? (was Re: CC Mode with font-lock-maximum-decoration 2))
Date: Fri, 12 Aug 2022 17:50:36 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

>> > I don't have this information.  Maybe someone else does.  But in
>> > general, it is a very small wonder that a parser written in optimized
>> > C is much faster than anything written in Emacs Lisp, given that Lisp
>> > is an interpreted language that has no special support for writing
>> > parsers.
>> That can be cured over time, now that the bulk of the core of emacs
>> uses lexical scoping.
> I very much doubt that.

Agreed.

> ELisp code cannot match the speed of optimized C code.

I suspect it could, to some extent, in theory.  Getting there would
require a fair bit more work, probably using a different compilation
strategy than the AOT compiler we have now.

A good reference is JavaScript which shouldn't be noticeably easier to
compile efficiently and where many millions of dollars have been poured
over several years to speed it up.  The result is indeed able to match
the performance of C nowadays for several non-trivial examples of code,
but it's far from obvious that we have the resources to reproduce this
feat for ELisp.


        Stefan




reply via email to

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