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: Shrinking the C core Date: Sat, 26 Aug 2023 08:48:09 +0300 Message-ID: <83r0nqmk12.fsf@gnu.org> References: <20230809094655.793FC18A4654@snark.thyrsus.com> <87zg2uqdmv.fsf@localhost> <87edk3gbh3.fsf@dataswamp.org> <87jztvnuyb.fsf@localhost> <875y5bdutt.fsf@dataswamp.org> <87y1i6e1uh.fsf@localhost> <874jkub40o.fsf@dataswamp.org> <87jztqdw2l.fsf@localhost> <87msym9i4r.fsf@dataswamp.org> <877cpp914t.fsf@localhost> <871qfx8yfq.fsf@localhost> <87sf8d7hj0.fsf@localhost> <838ra5wn8r.fsf@gnu.org> <878ra179fp.fsf@dataswamp.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36161"; mail-complaints-to="usenet@ciao.gmane.io" Cc: incal@dataswamp.org, emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Aug 26 07:48:41 2023 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 1qZmA3-0009AR-3E for ged-emacs-devel@m.gmane-mx.org; Sat, 26 Aug 2023 07:48:39 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qZm9K-00071K-J2; Sat, 26 Aug 2023 01:47: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 1qZm9I-00070z-Vn for emacs-devel@gnu.org; Sat, 26 Aug 2023 01:47:53 -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 1qZm9H-00078Q-OO; Sat, 26 Aug 2023 01:47:51 -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=ynRpTkjtISPkb11XBkm21/NktsVE8VD9456lHL6nqxg=; b=f3HWpwZMlRHT Ly0JIebIaftXGRZK+0rPr4WOsUJ31yOjqxysLHh1y8se6xYdMYk65zk75o27RmUMI2BoaqGfylHBY zHCJuIa0VcEL/0jq2W7e92sr7PUO1+iJsMvkirqJBSiAPwlooOuiY69xRFONM96t81+R4DHg0/gJD +W++00wTwX5y4/Pt+u1V9TgckVV9SHOcQ3yyIS5AE2BUE4lrauN4A3WqGG7rezW2+2OAF9HA3GLle QM9QrWq3Pnt+qcm8bOWGvyc0PgC0O8WWrLZxSCPie+myJHgT0e0WgK7tUJS2Vtr1uqqv1k6Q+Sgje FQj2WpFwIbXrT/57lovJJg==; In-Reply-To: (message from Richard Stallman on Fri, 25 Aug 2023 22:01:59 -0400) 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:309228 Archived-At: > From: Richard Stallman > Cc: emacs-devel@gnu.org > Date: Fri, 25 Aug 2023 22:01:59 -0400 > > Most Emacs commands' speed is limited in practice by the speed of > the user's typing. The few exceptions, in my usage, are limited by > the speed of searching large buffers. The above is correct, but is nowadays incomplete. Here are some relevant observations: . There are quite a few Lisp programs that run off post-command-hook or by timers. Those can slow down Emacs even while the user types, and even though the commands invoked by the actual keys the user types are themselves fast. . Searching large buffers is quite fast, but processing on top of that might not be. There are nowadays many features that work via various hooks and Lisp invocations from C (example: syntax search and analysis), and those can completely shadow the (usually small) cost of searching itself. . Some commands, such as byte-compile etc., perform significant processing in Lisp that can be slow. Some features, such as shr.el (which is used in commands that render HTML) also perform significant processing in Lisp. For these and other reasons, an Emacs with native-compilation feels tangibly faster than Emacs without native-compilation, and IMO that justifies the known downsides: the fact that native compilation is slower than byte compilation, and the compiled files are non-portable.