From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Sean McAfee Newsgroups: gmane.emacs.help Subject: obarray confusion Date: Wed, 27 Oct 2010 14:21:37 -0700 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1291881542 22267 80.91.229.12 (9 Dec 2010 07:59:02 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 9 Dec 2010 07:59:02 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Dec 09 08:58:58 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PQbOz-0007kF-Hq for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Dec 2010 08:58:57 +0100 Original-Received: from localhost ([127.0.0.1]:50292 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQbOy-0007Wd-Pt for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Dec 2010 02:58:56 -0500 Original-Path: usenet.stanford.edu!postnews.google.com!news2.google.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.supernews.com!news.supernews.com.POSTED!not-for-mail Original-NNTP-Posting-Date: Wed, 27 Oct 2010 16:21:38 -0500 Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:ckzc3wDR1P79JVgUMUJ3U2VLe34= Original-Lines: 8 Original-X-Trace: sv3-mkgeHeT2CYnxWFJpOVe6UTgzeM5eXjmki1vlz2npHDri2FxNlYjph+DJFWhd3j0xa9xFBjs2yq9U1Zr!1gJiRtgdLmNkwMY7lUhfqrHy+cT9vLJB51lgj3iTi3+wOYm3YJptaXUmCAiG6/dftj41X46gJgyT!wTJmuTE6io6OOwhPuwLXquPd Original-X-Complaints-To: www.supernews.com/docs/abuse.html X-DMCA-Complaints-To: www.supernews.com/docs/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 1469 Original-Xref: usenet.stanford.edu gnu.emacs.help:182079 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:76852 Archived-At: (mapatoms (lambda (s) (incf n))) tells me I have 43061 symbols defined. (length obarray) tells me the standard obarray has a size of 1511. My understanding is that an obarray is essentially a hash table with collision chaining. But this would mean that the linked list of symbols in each bucket has an average length of 43061 / 1511 ≈ 28. Emacs's symbol lookup couldn't possibly be that inefficient, could it?