unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* obarray confusion
@ 2010-10-27 21:21 Sean McAfee
       [not found] ` <87sjzr8boe.fsf@kuiper.lan.informatimago.com>
  2010-10-29 19:00 ` Stefan Monnier
  0 siblings, 2 replies; 4+ messages in thread
From: Sean McAfee @ 2010-10-27 21:21 UTC (permalink / raw)
  To: help-gnu-emacs

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-10-29 19:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).