From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Akib Azmain Turja Newsgroups: gmane.emacs.devel Subject: Re: Why tree-sitter instead of Semantic? (was Re: CC Mode with font-lock-maximum-decoration 2) Date: Sat, 13 Aug 2022 10:41:16 +0600 Message-ID: <87tu6gdac3.fsf@disroot.org> References: <83r11ptksn.fsf@gnu.org> <83a68dti6w.fsf@gnu.org> <874jykzvx9.fsf@yahoo.com> <83fsi4sttn.fsf@gnu.org> <838rnws5c7.fsf@gnu.org> <87wnbde9jo.fsf@disroot.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39388"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Aug 13 06:43:08 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 1oMizL-000A1K-Bf for ged-emacs-devel@m.gmane-mx.org; Sat, 13 Aug 2022 06:43:07 +0200 Original-Received: from localhost ([::1]:48092 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oMizK-0001ZL-5P for ged-emacs-devel@m.gmane-mx.org; Sat, 13 Aug 2022 00:43:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60572) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oMiya-0000pv-Qr for emacs-devel@gnu.org; Sat, 13 Aug 2022 00:42:21 -0400 Original-Received: from knopi.disroot.org ([178.21.23.139]:52258) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oMiyW-0005oc-88 for emacs-devel@gnu.org; Sat, 13 Aug 2022 00:42:20 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 179C741BB3; Sat, 13 Aug 2022 06:42:14 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Original-Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CDJpJJj2j7d3; Sat, 13 Aug 2022 06:42:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1660365732; bh=kbTt9SnmJltWRQhKeSnDcnu97aEp0/mDB2uM5e7Rk2Q=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=WtkaWkD6VN4sDX/4k6guV2UjgKOMFFZBERy5e/GmUOFugpdPul4eNqGjRl7ITneFs SOvHD4SweH479K3vKD0MtlS/AADjHqvjlCK5M4FwjBOQQi8eL6K/AvwtwUjNjmTvVr w7dlmOucj4ntKCYrycGbavSYbluFhJjdg5hrBGTB/rGN8tyMpEDlcoCSffij+sjMFM QVdGGW8LVujl+amfaNRSVyyoAxnv7c1vXwVB/I04J85IO/CQFs9v2yBlPeQcRPz75G PPFzQVaEJulkRUBDwrkUSy3qLnpx2NU08Xy4WC+UFGLyVgKIs/kgTNTg6rFwsJkXwh eL8L9CeC1hNhQ== In-Reply-To: (tomas@tuxteam.de's message of "Fri, 12 Aug 2022 21:06:48 +0200") Received-SPF: pass client-ip=178.21.23.139; envelope-from=akib@disroot.org; helo=knopi.disroot.org 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_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:293401 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable writes: > On Fri, Aug 12, 2022 at 10:00:43PM +0600, Akib Azmain Turja wrote: > > [...] > >> 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. > > [...] > > I think this is too simplistic. There are known (small) cases where > (compiled) Common Lisp beats C code, or where LuaJit [1] does (don't > forget: a JIT knows things about your program a compiler can't). At > the other end of the scale (the very complex), where you end up > writing a whole garbage collector in your C app, it will be pretty > hard to beat one of the modern GCs you'll find in Schemes or > Javascripts. > > So the answer to this is most probably "it depends" :) > > Cheers > > [1] https://wingolog.org/archives/2014/09/02/high-performance-packet-filt= ering-with-pflua Yeah, it's possible for very optimized Brainfuck code to beat poor C code. Emacs has a native compiler, and AFAIK it's a ahead of time (AOT) compiler. If you really need a JIT, do performance-critical things in Guile Scheme and use results from Emacs. =2D-=20 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 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEyVTKmrtL6kNBe3FRVTX89U2IYWsFAmL3K2wACgkQVTX89U2I YWtZ8Q//Xl8UdiBtRSvPWHyI+5w+2h7iKnsEollG/ov707b3TPeL85kGBeMLfyIK aISm9t2ulvH2ZuTDTnDciHQNEEm57rSP9rR3mdnVCso+YGw/Lk7PJI0HuruBZq2s 8j6EAHm5Q1A1C0wDxfnXvUnXDhOw1ixOVrP8OvGS5g3eyB/ZwwrNLFxFWTGeF9tS SXIFWUtlUwQ0B9cPi83bsd0aNpkNar7nV6rDKH9ZN2KD97G/it9dgPFJeb6Rk7se S+hSZiGR73QXmZyieAB4JSNepl2QtTplP/01XlW6kcTaZSh+WaY1jXggVuVWDIh5 a3xtS4cjcghRdXvVdiwi8/Qpa5iCrkrmWg0TiS765jxISyi5HJNMngWy3a9xk/iB 3VcceSCfZLli4d3p+2fEGQRW2nb+iAxV5B6fL63HiMJt7sZUyVZ15s0th/9FGIXK jDA2TngWu5IB9WbUiZC54dmhX1chj3XGG181SCsuF2PQ9OnPcvROpvVaiQwRER7n 0+6R54QjkboGc1q2D0PCrkCWHyW3f1wWaVkc/5kwy/AgehckmIqIrcV9ynKLoT/P 3c3bNMpMljnOmqtPDSTNl3EJjFTv4pEv7EyeASBTZhLlNIF8vc8tpYUobNKXA3QY Qn06ByUH3NTyHUEN3r9Cu0vHplRbIqZmz0vQTMdWAZm0YnJ8VBw= =qcV+ -----END PGP SIGNATURE----- --=-=-=--