From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: CC Mode -> Tree sitter challenge Date: Sat, 05 Nov 2022 15:31:44 +0200 Message-ID: <83tu3d34u7.fsf@gnu.org> References: <87v8nu1mt1.fsf@thornhill.no> <83eduh4vcf.fsf@gnu.org> <87mt951r69.fsf@thornhill.no> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36731"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, casouri@gmail.com, monnier@iro.umontreal.ca To: Theodor Thornhill Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Nov 05 14:32:26 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 1orJHe-0009OX-AL for ged-emacs-devel@m.gmane-mx.org; Sat, 05 Nov 2022 14:32:26 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1orJH8-0008Qy-4U; Sat, 05 Nov 2022 09:31:54 -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 1orJH3-0008Nv-ND for emacs-devel@gnu.org; Sat, 05 Nov 2022 09:31:50 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1orJH2-0000o3-GY; Sat, 05 Nov 2022 09:31:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=GG3xpXIhwCbTc8iZbhlcq35f0HrjaD2O0RN+EebFG6E=; b=WeK04OjsW3uf oMxRX9zllreDjkeUoC9Tr3XsTU3rqleMOaKBKyCaW3nr0uh/j+KK9tlqQEL1BPMFKDar9cA2rO/6W oAV66j+aa44lLyP24pzjdO9D8BjB3IjZDVDVNjuLeLFy2qLYr1J3EqSTGmNL8q2O+QU7DZ61iDuf5 /CLbJH3AN2DoOaus2rdsp3VdgpFBhy1MSxbCWPYr8+LFnpPuIXM6WPhxvLlxash+G46q9HVZ4640i /p+ERfTEZwn3shtUVVn5vX588wxZs3CUkizFNGG7qZOIOTU1Ga4BRlmDiWu3GyMhzG9dZz1fiXKIT s8Xn+8rIGspBKFrwlKj9jw==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1orJH1-00024D-K5; Sat, 05 Nov 2022 09:31:47 -0400 In-Reply-To: <87mt951r69.fsf@thornhill.no> (message from Theodor Thornhill on Sat, 05 Nov 2022 14:12:14 +0100) 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:299201 Archived-At: > From: Theodor Thornhill > Cc: emacs-devel@gnu.org, casouri@gmail.com, monnier@iro.umontreal.ca > Date: Sat, 05 Nov 2022 14:12:14 +0100 > > So this is the code with results thus far. It is immediately apparent > how much faster this is, IMO. Every test is run from a fresh `emacs > -Q`. I just eval the files, enable the modes and run the tests. > > What do you think? Looks very promising, thanks. > Is there anything clearly wrong with the benchmarks? I hope not ;-) > In many of the cases tree-sitter is an order of magnitude faster. Only in the "go-to-EOB" one, it looks like? in the others it is 3 times faster on the average, or what did I miss? How about benchmarking indentation? E.g., how long does it take to re-indent a large enough function when you add, say, 'if {' at the beginning and '}' at the end?