Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Multi-Minute Startup?
- X-seq: zsh-users 13139
- From: Phil Pennock <zsh-workers+phil.pennock@xxxxxxxxxxxx>
- To: Richard Hartmann <richih.mailinglist@xxxxxxxxx>
- Subject: Re: Multi-Minute Startup?
- Date: Thu, 14 Aug 2008 11:37:27 -0700
- Cc: Dan Nelson <dnelson@xxxxxxxxxxxxxxx>, Aaron Davies <aaron.davies@xxxxxxxxx>, "Benjamin R. Haskell" <zsh@xxxxxxxxxx>, Zsh Users <zsh-users@xxxxxxxxxx>
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=d200807; d=spodhuis.org; h=Received:Date:From:To:Cc:Subject:Message-ID:Mail-Followup-To:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; b=RM5l24xeOHWmHeLTy7Ei/BI8Hlw4noVSXqLT7n0vkon1XNfTozFTAcULP5vNWD92MJH2rSZOd37qsgt/o5VIScPGdyPXmv5yeSTph2oX0UP2tgPUBe/V49FUc0IJeMVIHlpmksUV8PXzUDHY8wj/L5bFpgCO+lQNA5i5oGzKjFo=;
- In-reply-to: <2d460de70808140608t7cc8ca48v4117feb57c97ca3b@xxxxxxxxxxxxxx>
- Mail-followup-to: Richard Hartmann <richih.mailinglist@xxxxxxxxx>, Dan Nelson <dnelson@xxxxxxxxxxxxxxx>, Aaron Davies <aaron.davies@xxxxxxxxx>, "Benjamin R. Haskell" <zsh@xxxxxxxxxx>, Zsh Users <zsh-users@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <alpine.LNX.1.10.0808070327310.26055@xxxxxxxxxxxxxxxxxxxxx> <c4e763ac0808070152k2846913dn4b637fe9ea275ef2@xxxxxxxxxxxxxx> <alpine.LNX.1.10.0808070509320.26055@xxxxxxxxxxxxxxxxxxxxx> <c4e763ac0808071832j6f7393fay158c7a2485ca41c9@xxxxxxxxxxxxxx> <20080808025823.GB68181@xxxxxxxxxxxxxxxx> <c4e763ac0808072340l398c5209o1cd6ccd77ec08a7f@xxxxxxxxxxxxxx> <alpine.LNX.1.10.0808081201180.26055@xxxxxxxxxxxxxxxxxxxxx> <c4e763ac0808110248g7dedabb9kbe6af57fcb0b8d68@xxxxxxxxxxxxxx> <20080811152909.GA61872@xxxxxxxxxxxxxxxx> <2d460de70808140608t7cc8ca48v4117feb57c97ca3b@xxxxxxxxxxxxxx>
On 2008-08-14 at 15:08 +0200, Richard Hartmann wrote:
> On Mon, Aug 11, 2008 at 17:29, Dan Nelson <dnelson@xxxxxxxxxxxxxxx> wrote:
> > Raise suggested-size to 1601 (a prime number larger than your current
> > list size with some room to grow).
>
> Using a prime hints at an interesting reason. What is it?
General hashing algorithm theory. I forget the math (if I ever knew
it); also, there's a lot of heuristics in there ("that seems to work,
let's go with that").
You tend to not be hashing completely random data and in the absence of
distribution information about the input data, bucketing into a prime
number of slots tends to cause the least pain.
You'll find prime number requirements for many hash bucketing schemes.
-Phil, who should have made more effort to stay awake that lecture
Messages sorted by:
Reverse Date,
Date,
Thread,
Author