From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] feature/byte-switch 13eabbd: bytecode.c (exec_byte_code): Use h->count instead of HASH_TABLE_SIZE Date: Thu, 09 Feb 2017 08:58:40 -0500 Message-ID: References: <20170209134357.2270.49861@vcs0.savannah.gnu.org> <20170209134357.C161E25FF6@vcs0.savannah.gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1486648750 25623 195.159.176.226 (9 Feb 2017 13:59:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 9 Feb 2017 13:59:10 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: Vibhav Pant To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 09 14:59:06 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cbpFa-0006RN-7q for ged-emacs-devel@m.gmane.org; Thu, 09 Feb 2017 14:59:06 +0100 Original-Received: from localhost ([::1]:38068 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cbpFe-0004PX-7b for ged-emacs-devel@m.gmane.org; Thu, 09 Feb 2017 08:59:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50197) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cbpFH-0004Fo-I2 for emacs-devel@gnu.org; Thu, 09 Feb 2017 08:58:48 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cbpFC-0004g6-Kv for emacs-devel@gnu.org; Thu, 09 Feb 2017 08:58:47 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:44238) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cbpFC-0004f6-FW for emacs-devel@gnu.org; Thu, 09 Feb 2017 08:58:42 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0DEBQAu3EVY//7rSC1dGwEBAQMBAQEJAQEBgzgBAQEBAR+EW6F8AZZeGYYDBAICghFEEAECAQEBAQEBAWIohGkGJy8jEAs0BwsUGA2JJqxXPYtEAQEIAiWLGYUUhRUFj3yKapJzAYgmhjpJkUY2IHgTDoNbHRiBYyCJLQEBAQ X-IPAS-Result: A0DEBQAu3EVY//7rSC1dGwEBAQMBAQEJAQEBgzgBAQEBAR+EW6F8AZZeGYYDBAICghFEEAECAQEBAQEBAWIohGkGJy8jEAs0BwsUGA2JJqxXPYtEAQEIAiWLGYUUhRUFj3yKapJzAYgmhjpJkUY2IHgTDoNbHRiBYyCJLQEBAQ X-IronPort-AV: E=Sophos;i="5.33,749,1477972800"; d="scan'208";a="292463450" Original-Received: from 45-72-235-254.cpe.teksavvy.com (HELO pastel.home) ([45.72.235.254]) by smtp.teksavvy.com with ESMTP; 09 Feb 2017 08:58:40 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 3117463FB6; Thu, 9 Feb 2017 08:58:40 -0500 (EST) In-Reply-To: <20170209134357.C161E25FF6@vcs0.savannah.gnu.org> (Vibhav Pant's message of "Thu, 9 Feb 2017 08:43:57 -0500 (EST)") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:212167 Archived-At: > +#ifdef BYTE_CODE_SAFE > + /* Hash tables for switch are declared with :size set to exact > + number of cases, so this should always be true. */ > + eassert (HASH_TABLE_SIZE (h) == h->count); > +#endif This equality is not needed for safety, only for performance. IOW you can drop the assert altogether and turn it into a comment. Stefan