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: Excessive use of `eassert` Date: Fri, 19 Jan 2024 18:23:06 +0200 Message-ID: <83mst1uwb9.fsf@gnu.org> References: <83jzo5x0q8.fsf@gnu.org> <83sf2tv029.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25898"; mail-complaints-to="usenet@ciao.gmane.io" Cc: eggert@cs.ucla.edu, acm@muc.de, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jan 19 17:23:55 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 1rQres-0006SZ-KW for ged-emacs-devel@m.gmane-mx.org; Fri, 19 Jan 2024 17:23:54 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rQreE-0005Pg-2v; Fri, 19 Jan 2024 11:23:14 -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 1rQreC-0005PG-Jk for emacs-devel@gnu.org; Fri, 19 Jan 2024 11:23:12 -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 1rQreB-0006Pv-8K; Fri, 19 Jan 2024 11:23:11 -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=HQCG4eGZK/1wG5dwqujkl5EOEQdHJ9F8GuSXCR/0ruk=; b=dqjFQrOXt1c+ PuImPqGAGK7HzkrYZowmW6gEYUnk3Co9Nnbu4tMK5npVqziNqSkZsCUjMKqLVDAi/Snr+Et3qeEhV 1qxIETUe7tz2eaT1bYNG00PcFYJyGAZuFRZVK4asOhd+HO+0YeYiGR7+IXKdfj4xiHyOBLMLL/w16 Eq3JoEe26/u5izu4SpxHVRzTVf0P+teWvoyMcz/1a+WvMi6IqXNLnNssYSFhEk3w7iLsClcVqQPcM ppJ0Dh6QNujtOckf3/iwP/wKfEZYoiSH5HA4jHtdBBwV7cuDPbMIaUXQGGhWZ/IYfJT/dbvNZ2ME6 hWKdsGv6FWsIL6uS1QHlxg==; In-Reply-To: (message from Stefan Monnier on Fri, 19 Jan 2024 10:50:51 -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:315116 Archived-At: > From: Stefan Monnier > Cc: Paul Eggert , Alan Mackenzie , > emacs-devel@gnu.org > Date: Fri, 19 Jan 2024 10:50:51 -0500 > > > since 2016. I use an Emacs build with ENABLE_CHECKING and without > > optimizations every day, and while it is indeed slower than the > > production build by a factor of 3.5, it is not unbearably slow. > > Same here. I can't vouch for 3.5 specifically, but 3-4 sounds about > right for me as well. Tho I'll also note that (many) years ago > the slowdown was lower, more in the 2x ballpark. It's possible that GCC optimizes better nowadays. Also, back then we had macros, not inline functions that sometimes aren't inlined. > In any case, I'm not insisting. Neither am I. > I already removed that assertion from > my local branch, which is the one that affects me. My messages was > mostly intended to share my discovery/surprise: I always assumed that > something like `Qnil` in the source would turn into some kind of > constant in the machine code (possibly modulo relocation), regardless of > ENABLE_CHECKING. Let's see what Paul and Alan think.