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: __builtin_expect Date: Fri, 29 Nov 2024 09:19:55 +0200 Message-ID: <861pyucxr8.fsf@gnu.org> References: <-RjfswKL3C48Xb5i4UIUxCjnwRceVcJLWbxPqC118LgFluGk1pC9nPnX7uvy2pfLr9_tIT4c6LRO47ggVIB5_jw91LHlu4SrGGkJYOd4j8k=@protonmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37748"; mail-complaints-to="usenet@ciao.gmane.io" Cc: pipcet@protonmail.com, emacs-devel@gnu.org To: Andrea Corallo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Nov 29 08:20:56 2024 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 1tGvJ8-0009ax-IA for ged-emacs-devel@m.gmane-mx.org; Fri, 29 Nov 2024 08:20:54 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tGvIF-0003Wb-J0; Fri, 29 Nov 2024 02:19:59 -0500 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 1tGvIE-0003WE-E7 for emacs-devel@gnu.org; Fri, 29 Nov 2024 02:19:58 -0500 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 1tGvID-0001Yi-GF; Fri, 29 Nov 2024 02:19:57 -0500 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=VuW9wb2DJFm86srIMdjjhIzahCQORdmiFnCCRhC/DWQ=; b=B2hD2+RAZrDr 6G5Cuuh31j2kqagk/3LBfmDkiFIRjc8TwGvOXVW+yqCo4T8LmzCuJdHnARV/kWpwXgRz4vpaW0mF1 ied01RjwrZPDDfCfY4BLl4qCV6vNrQg6spOwFwO5Bg2zziQZWcmjVBzCLT81qaM6XlM0wqUnbRn2y 7RxBDjDfVb5d5FA6CFPZzsCwxMcIDNxu/cHFPgiKejnscqHugruo1geJUIUbwIUTory7BQEPXd3Vx vVsR7HLOYMGghIBWW33ZoqFOArUCG+k7XThXw76HBLvNoMlifBi9WoPmcOEVkGDP45pzuPXcijX5S wD/iJtYaO1na857urc3MKg==; In-Reply-To: (message from Andrea Corallo on Thu, 28 Nov 2024 16:32:25 -0500) 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:325844 Archived-At: > From: Andrea Corallo > Cc: Emacs Devel > Date: Thu, 28 Nov 2024 16:32:25 -0500 > > > You said that your assumption holds "when we are not compiling", but your code change applies to the other case, too. > > Indeed, but Emacs is rarely compiling, Emacs is not primary a compiler, > and I hope it's clear that we want to optimize for its everyday typical > use. Given in that case 'syms_with_pos_enabled' is simply false all the > time, this is just the way to express that to the compiler so it can > generate the right code. I agree. > Actually AFAIU/R the presence of 'syms_with_pos_enabled' there *is* an > optimization to mitigate the performance impact of this feature on the > most common Emacs usecase (the one my patch optimized further). Right.