A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://lists.gnu.org/archive/html/emacs-devel/2022-11/msg00332.html below:

Re: CC Mode -> Tree sitter challenge

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] From: Yuan Fu Subject: Re: CC Mode -> Tree sitter challenge Date: Sat, 5 Nov 2022 18:13:14 -0700
> On Nov 5, 2022, at 9:38 AM, Theodor Thornhill <theo@thornhill.no> wrote:
> 
> 
> Hi again, Eli!
> 
>>> 
>>> Interesting. My guess is that there are still some improvement possible in 
>>> the indent-region code, considering that part of treesit.el is quite new.
>>> 
>>> What do you think, Yuan? Any thoughts?
>>> 
>>> Anyways, I'll keep working on this and see how far I get next coming weeks. 
>>> At least in performance it seems I have a good thing going here :-)
>>> 
>> 
>> Thinking of it, some of the indentation questions isn't compiled. I'll run 
>> it again later when they are compiled as well :-)
>> 
> 
> Yes, that was the issue.  Now the scores are as follows:

The indentation code has a list of rules, and it runs each rule top-to-bottom 
until one rules matches, then it uses that rule to determine how much to 
indent. The ordering of each rule could be tweaked so that most frequent case 
comes forward. We can also arrange these rules not linearly but in a tree, so 
if one rules matches/doesn’t match, some other rules can be skipped.

What exactly did you compile? I tried byte-compiling indentation rules before 
but didn’t see a significant speed-up.

Yuan


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4