unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: help-gnu-emacs@gnu.org
Subject: Re: obarray confusion
Date: Fri, 29 Oct 2010 15:00:08 -0400	[thread overview]
Message-ID: <jwvk4l0zuyz.fsf-monnier+gnu.emacs.help@gnu.org> (raw)
In-Reply-To: bp88w1j49i6.fsf@usca1uw-JZWWPM1.sanmateo.corp.akamai.com

> (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.

That's right.

> Emacs's symbol lookup couldn't possibly be that inefficient, could it?

I think it not only could.


        Stefan


      parent reply	other threads:[~2010-10-29 19:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-27 21:21 obarray confusion Sean McAfee
     [not found] ` <87sjzr8boe.fsf@kuiper.lan.informatimago.com>
2010-10-29 10:12   ` David Kastrup
2010-10-29 10:46     ` Pascal J. Bourguignon
2010-10-29 19:00 ` Stefan Monnier [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvk4l0zuyz.fsf-monnier+gnu.emacs.help@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).