[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Length of obarray vectors
From: |
Pascal J. Bourguignon |
Subject: |
Re: Length of obarray vectors |
Date: |
Fri, 06 Nov 2009 12:16:38 +0100 |
User-agent: |
Gnus/5.1008 (Gnus v5.10.8) Emacs/22.3 (darwin) |
Nordlöw <per.nordlow@gmail.com> writes:
> On Nov 6, 11:18 am, Nordlöw <per.nord...@gmail.com> wrote:
>> What length should I use when I create a vector that will act as an
>> obarray?
>> My suggestion: The smallest prime larger than the number of symbols
>> that should be interned?
>> If this is correct why does (length obarray) give such a small number,
>> 15
>>
>> Thanks,
>> Nordlöw
>
> It should be 1511, not 15.
>
> Forgot one thing: My guess: Is it a trade-off of performance (big
> length) and memory usage (small length)?
The reason is that obarrays are not arrays, but trees. You're watching
only the root of the tree.
--
__Pascal Bourguignon__