From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Barry Margolin Newsgroups: gmane.emacs.help Subject: Re: plists, alists, and hashtables Date: Wed, 05 Aug 2015 15:30:07 -0400 Organization: A noiseless patient Spider Message-ID: References: <876150vwaa.fsf@mbork.pl> <873803x5q4.fsf@kuiper.lan.informatimago.com> <87a8u7we9s.fsf_-_@lifelogs.com> <02f81836-554f-4bb4-873b-85c24e080e3d@googlegroups.com> <87614uqn5l.fsf@kuiper.lan.informatimago.com> <87d1z2ukw1.fsf@lifelogs.com> <878u9pps1c.fsf@kuiper.lan.informatimago.com> <87oailbn8t.fsf@lifelogs.com> NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1438803019 5412 80.91.229.3 (5 Aug 2015 19:30:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 5 Aug 2015 19:30:19 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Aug 05 21:30:19 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZN4OG-0003ZX-QB for geh-help-gnu-emacs@m.gmane.org; Wed, 05 Aug 2015 21:30:16 +0200 Original-Received: from localhost ([::1]:41856 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZN4OG-0002y5-7n for geh-help-gnu-emacs@m.gmane.org; Wed, 05 Aug 2015 15:30:16 -0400 Original-Path: usenet.stanford.edu!news.kjsl.com!feeder.erje.net!us.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!barmar.motzarella.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 29 Injection-Info: barmar.motzarella.org; posting-host="2be9e9f5dd9af768b8861af71b85fc28"; logging-data="21550"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+qTJJfDPBLdS7Tb0SxFbH0" User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) Cancel-Lock: sha1:O5MFqd1jCHnURn3l67cHxOK3IfE= Original-Xref: usenet.stanford.edu gnu.emacs.help:213978 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:106263 Archived-At: In article <87oailbn8t.fsf@lifelogs.com>, Ted Zlatanov wrote: > I think these details are easily optimized at the C level. Clearly an > alist is better as the *backend* hashtable implementation for up to 10, > possibly up to 100 entries (depending on caching, pipelining, hashing > function, and other factors). But the frontend presentation is what I'm > concerned about. I think a better reader syntax for hashtables would > make them easier to write and read in code and would error out if they > are malformed. That's an improvement over alists and plists I think. IIRC, at one time Symbolics had an implementation of Common Lisp hashtables that chose different internal representations depending on various attributes of the table, like the current size and equivalence function. But I think they got rid of this because there were bugs that occurred as a result of the table changing reps on the fly, and I guess they discovered that it didn't really buy that much in performance. For instance, the break-even point for alists is probably pretty low, and hash tables tended to be used for large tables. Of course, that was before languages like Perl, PHP, and Javascript popularized the idea of using small hash tables to implement structures. -- Barry Margolin, barmar@alum.mit.edu Arlington, MA *** PLEASE post questions in newsgroups, not directly to me ***