[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Why tree-sitter instead of Semantic? (was Re: CC Mode with font-lock
From: |
Akib Azmain Turja |
Subject: |
Re: Why tree-sitter instead of Semantic? (was Re: CC Mode with font-lock-maximum-decoration 2) |
Date: |
Fri, 12 Aug 2022 22:00:43 +0600 |
Lynn Winebarger <owinebar@gmail.com> writes:
> On Wed, Aug 10, 2022 at 7:31 AM Eli Zaretskii <eliz@gnu.org> wrote:
>>
>> 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. With proper tail recursion, ELisp should be
> able to produce lexers and parsers roughly as efficient as C code, if
> not more efficient (depending on if you allow use of "computed goto"
> in the C code for the lexers and parsers). That does require changes
> to the byte code VM, but it's doable.
It's hard for any compiled language to beat C code, and I believe it's
*impossible* for any interpreted language to do that. And if it somehow
does that, I would believe that the result is *hard-coded* in it.
By the way, is native compiled Emacs Lisp faster than the code produced
by Guile's JIT? If so, we can write the parser and the lexer in Scheme
and use the result in Emacs.
(Triggering a heated discussion again...) Or maybe we can link Guile
to Emacs so that people can extend Emacs with the "GNU’s Ubiquitous
Intelligent Language for Extensions".
--
Akib Azmain Turja
Find me on Mastodon at @akib@hostux.social.
This message is signed by me with my GnuPG key. Its fingerprint is:
7001 8CE5 819F 17A3 BBA6 66AF E74F 0EFA 922A E7F5
signature.asc
Description: PGP signature
- Re: Ideal performance of ELisp, (continued)
- Re: Ideal performance of ELisp, Andrea Corallo, 2022/08/16
- Re: Ideal performance of ELisp, Ihor Radchenko, 2022/08/16
- Re: Ideal performance of ELisp, Andrea Corallo, 2022/08/16
- Re: Ideal performance of ELisp, Ihor Radchenko, 2022/08/17
- Re: Ideal performance of ELisp, Eli Zaretskii, 2022/08/17
- Re: Ideal performance of ELisp, Lynn Winebarger, 2022/08/16
- Re: Ideal performance of ELisp, Andrea Corallo, 2022/08/16
- Re: Ideal performance of ELisp, Lynn Winebarger, 2022/08/17
- Re: Ideal performance of ELisp, Andrea Corallo, 2022/08/17
- Re: Ideal performance of ELisp, Lynn Winebarger, 2022/08/18
- Re: Why tree-sitter instead of Semantic? (was Re: CC Mode with font-lock-maximum-decoration 2),
Akib Azmain Turja <=
- Re: Why tree-sitter instead of Semantic? (was Re: CC Mode with font-lock-maximum-decoration 2), tomas, 2022/08/12
- Re: Why tree-sitter instead of Semantic? (was Re: CC Mode with font-lock-maximum-decoration 2), Akib Azmain Turja, 2022/08/13
- Re: Why tree-sitter instead of Semantic? (was Re: CC Mode with font-lock-maximum-decoration 2), tomas, 2022/08/13
- Re: Why tree-sitter instead of Semantic? (was Re: CC Mode with font-lock-maximum-decoration 2), Lynn Winebarger, 2022/08/13
- Re: Why tree-sitter instead of Semantic? (was Re: CC Mode with font-lock-maximum-decoration 2), Akib Azmain Turja, 2022/08/13
- Re: Why tree-sitter instead of Semantic? (was Re: CC Mode with font-lock-maximum-decoration 2), Eric Ludlam, 2022/08/14
- Re: Why tree-sitter instead of Semantic? (was Re: CC Mode with font-lock-maximum-decoration 2), Lynn Winebarger, 2022/08/16
- Re: Why tree-sitter instead of Semantic? (was Re: CC Mode with font-lock-maximum-decoration 2), Eric Ludlam, 2022/08/16
- Re: Why tree-sitter instead of Semantic? (was Re: CC Mode with font-lock-maximum-decoration 2), Tassilo Horn, 2022/08/10
- Re: Why tree-sitter instead of Semantic? (was Re: CC Mode with font-lock-maximum-decoration 2), Jostein Kjønigsen, 2022/08/13