help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: obarray confusion


From: Stefan Monnier
Subject: Re: obarray confusion
Date: Wed, 08 Dec 2010 15:33:55 -0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]