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: [PATCH]: Add new bytecode op `switch' for implementing branch tables. Date: Tue, 07 Feb 2017 09:41:22 -0500 Message-ID: References: NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1486478548 1900 195.159.176.226 (7 Feb 2017 14:42:28 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 7 Feb 2017 14:42:28 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) Cc: "emacs-devel@gnu.org" To: Vibhav Pant Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 07 15:42:22 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 1cb6yL-00007P-FW for ged-emacs-devel@m.gmane.org; Tue, 07 Feb 2017 15:42:21 +0100 Original-Received: from localhost ([::1]:54446 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cb6yQ-0007XE-UY for ged-emacs-devel@m.gmane.org; Tue, 07 Feb 2017 09:42:26 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48750) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cb6xU-0007Vo-Ij for emacs-devel@gnu.org; Tue, 07 Feb 2017 09:41:29 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cb6xQ-0004ml-Kn for emacs-devel@gnu.org; Tue, 07 Feb 2017 09:41:28 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:28620) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cb6xQ-0004la-D0 for emacs-devel@gnu.org; Tue, 07 Feb 2017 09:41:24 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0D1LgAu3EVY//7rSC1dGwEBAQMBAQEJAQEBgzgBAQEBAR+EW4VUnAImAZJHhBeGHAQCAoIRRBABAgEBAQEBAQFiKIRpAQQBViMQCzQSFBgNJIh6CK0Ui0QBAQgCJYsZiikFj3yKapJziCeGOpIPNiB4Ew6FcyCJLQEBAQ X-IPAS-Result: A0D1LgAu3EVY//7rSC1dGwEBAQMBAQEJAQEBgzgBAQEBAR+EW4VUnAImAZJHhBeGHAQCAoIRRBABAgEBAQEBAQFiKIRpAQQBViMQCzQSFBgNJIh6CK0Ui0QBAQgCJYsZiikFj3yKapJziCeGOpIPNiB4Ew6FcyCJLQEBAQ X-IronPort-AV: E=Sophos;i="5.33,749,1477972800"; d="scan'208";a="292260450" Original-Received: from 45-72-235-254.cpe.teksavvy.com (HELO pastel.home) ([45.72.235.254]) by smtp.teksavvy.com with ESMTP; 07 Feb 2017 09:41:22 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id A7D51657D7; Tue, 7 Feb 2017 09:41:22 -0500 (EST) In-Reply-To: (Vibhav Pant's message of "Tue, 7 Feb 2017 14:15:18 +0530") 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:212093 Archived-At: >> Hmm... so goto-if-nil is never used any more? Aren't there cases where >> byte-switch results in slower code than goto-if-nil? > Once linear search for gethash when the number of keys are small is > implemented, byte-switch should still be faster, as all byte-goto-if-nil > and byte-goto-if-nil-else-pop bytecode is "replaced" with native linear > search code. Does that mean you answered "yes" to the first question? I thought goto-if-nil is also used in other circumstances. Stefan