From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Theodor Thornhill Newsgroups: gmane.emacs.devel Subject: Re: CC Mode -> Tree sitter challenge Date: Sat, 05 Nov 2022 16:27:54 +0100 Message-ID: <3A13DCFD-3306-492B-8022-DCE95EC340A3@thornhill.no> References: <87v8nu1mt1.fsf@thornhill.no> <83eduh4vcf.fsf@gnu.org> <87mt951r69.fsf@thornhill.no> <83tu3d34u7.fsf@gnu.org> <87eduhxy9l.fsf@thornhill.no> <83pme130xs.fsf@gnu.org> <717833B0-285B-460F-B37B-F0B215BD1185@thornhill.no> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27377"; mail-complaints-to="usenet@ciao.gmane.io" Cc: casouri@gmail.com, monnier@iro.umontreal.ca To: emacs-devel@gnu.org, Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Nov 05 16:28:48 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1orL6C-0006y4-J8 for ged-emacs-devel@m.gmane-mx.org; Sat, 05 Nov 2022 16:28:44 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1orL5i-0005zV-W1; Sat, 05 Nov 2022 11:28:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1orL5e-0005z5-S3 for emacs-devel@gnu.org; Sat, 05 Nov 2022 11:28:10 -0400 Original-Received: from out2.migadu.com ([188.165.223.204]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1orL5c-0000wk-ND; Sat, 05 Nov 2022 11:28:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1667662085; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=o25+BsggR2AOtgT/cWUj6iz1NO+4TdeAP85G9XRIFCw=; b=YOWS4I6zgOk/CGV8nQy4psg4qjuhT1Wota9IzdY7MWa44WFM+AII9hrXxoBLIW7k1/IgNr uRDbIwp60A+OuKIBR+yQAuWNmk7VIe4Usrby2QTROkq6xHdef+3IsNgynVKoDfUbQ5VPnQ MR5LAr82XprP898Mt2Yq2VD31d6mdCSYeacEqcj/5wPrMPZazXeUWGFhdtq9pWA9VBnCTf uCrb1N6GjvwQTSlPL6/Sb4tKlPgo6DsaJj5NnqduCncj/jbQ/ZUc6d7HCq6IwY1mlt6uad SqrqF+32fTv9mjqy3R+WSg0S0GP8T4YQuZwarbmJ6h7a6ygaRqY1iUX/MSryzw== X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. In-Reply-To: <717833B0-285B-460F-B37B-F0B215BD1185@thornhill.no> X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=188.165.223.204; envelope-from=theo@thornhill.no; helo=out2.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: "Emacs-devel" Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:299213 Archived-At: On 5 November 2022 16:06:29 CET, Theodor Thornhill w= rote: > > >On 5 November 2022 15:55:59 CET, Eli Zaretskii wrote: >>> From: Theodor Thornhill >>> Cc: emacs-devel@gnu=2Eorg, casouri@gmail=2Ecom, monnier@iro=2Eumontrea= l=2Eca >>> Date: Sat, 05 Nov 2022 15:37:58 +0100 >>>=20 >>> I took the function 'note_mouse_highlight' from xdisp=2Ec, pushed all >>> lines to column 0 and ran: >>>=20 >>> Keep in mind that the indentation result is not 100% identical, but I >>> doubt that will change anything=2E >> >>Why isn't it identical? Is it because the indentation code is not yet >>in its final shape? >> > >Yes, I have to find each case covered by the language and account for it= =2E There's nothing inherent to Yuans code, at least I don't think so=2E Th= ere's still stuff to be done, of course=2E > >>> I'll benchmark everything again when we're satisfied with the >>> behavior=2E This is only 2 evenings worth of hacking=2E >> >>OK, thanks=2E Again, looks good, especially I like how much less GC >>this produces=2E But note that the, if you subtract the time taken by >>GC, CC Mode is actually slightly faster: 6=2E5 sec vs 9=2E I wonder why >>is that=2E > >Interesting=2E My guess is that there are still some improvement possible= in the indent-region code, considering that part of treesit=2Eel is quite = new=2E > >What do you think, Yuan? Any thoughts? > >Anyways, I'll keep working on this and see how far I get next coming week= s=2E At least in performance it seems I have a good thing going here :-) > Thinking of it, some of the indentation questions isn't compiled=2E I'll r= un it again later when they are compiled as well :-) >Theo >