Article View: comp.arch
Article #12600Re: % in hash table
From: Samuel P. Kho
Date: Wed, 04 Oct 1995 04:31
Date: Wed, 04 Oct 1995 04:31
20 lines
1120 bytes
1120 bytes
In article <44sjp4$c71@news.jf.intel.com>, Mike Haertel <haertel@ichips.intel.com> wrote: >People who do hashing usually like primes. There are some primes of the >form 2^n +- 1; remainders modulo such primes still do not require the full >force of a fully general remainder routine. Most compilers I've seen do not >optimize this case, but they could--it's only a couple extra shifts and >adds over mod 2^n. could you describe how to take modulo-prime-number-1-less-than-2^n by few shifts and adds over mod 2^n? thank you! - sam - >Mike Haertel <haertel@ichips.intel.com> -- Samuel P. Kho <samkho@rahul.net>
Technical Details
Message-ID:
<44t2n7$oe1@bug.rahul.net>Path:
arc1-ca.pugleaf.net!samkho.a2i!samkhoReferences:
<43tqr6$3au@mikasa.iol.it> <DFLzD9.Anx@uns.bris.ac.uk> <jgkDFv094.JKJ@netcom.com> <44sjp4$c71@news.jf.intel.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!samkho.a2i!samkho From: "Samuel P. Kho" <samkho@rahul.net> Newsgroups: comp.arch,comp.arch.arithmetic,comp.lang.c Subject: Re: % in hash table Date: 4 Oct 1995 04:31:35 GMT Organization: a2i network Distribution: world Message-ID: <44t2n7$oe1@bug.rahul.net> References: <43tqr6$3au@mikasa.iol.it> <DFLzD9.Anx@uns.bris.ac.uk> <jgkDFv094.JKJ@netcom.com> <44sjp4$c71@news.jf.intel.com> NNTP-Posting-Host: bolero.rahul.net NNTP-Posting-User: samkho Keywords: hash