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 c4316a2: ; bytecomp.el (byte-compile-cond-jump-table): Add TODO note Date: Mon, 06 Feb 2017 12:40:05 -0500 Message-ID: References: <20170206140314.23384.66886@vcs.savannah.gnu.org> <20170206140315.229CD220145@vcs.savannah.gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1486403685 31325 195.159.176.226 (6 Feb 2017 17:54:45 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 6 Feb 2017 17:54:45 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 06 18:54:41 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 1canUv-0007uU-1y for ged-emacs-devel@m.gmane.org; Mon, 06 Feb 2017 18:54:41 +0100 Original-Received: from localhost ([::1]:49949 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1canV0-000420-D8 for ged-emacs-devel@m.gmane.org; Mon, 06 Feb 2017 12:54:46 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47375) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1canH4-0001X9-Ks for emacs-devel@gnu.org; Mon, 06 Feb 2017 12:40:23 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1canH1-0000Bb-Hn for emacs-devel@gnu.org; Mon, 06 Feb 2017 12:40:22 -0500 Original-Received: from [195.159.176.226] (port=54870 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1canH1-0000BI-BR for emacs-devel@gnu.org; Mon, 06 Feb 2017 12:40:19 -0500 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1canGq-0005HE-LJ for emacs-devel@gnu.org; Mon, 06 Feb 2017 18:40:08 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 12 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:3vfh6oyROo6NbfSdJYEob2x0ijg= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 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:212050 Archived-At: >>> But rather than a :linear-search keyword to make-hash-table, can't we >>> just test the value of `count` and use a linear search if it's small? > Nitpick: actually, it should be based on the hash-table's *size* rather > than its *count*. For me, the place where small hash tables showed up is in cl-generic, where many of them have just a single entry. For byte-switch, optimizing the single-entry case is not important (you wouldn't want to use byte-switch for it), tho. Stefan