🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #12634

Re: % in hash table

#12634
From: Joe Buck
Date: Thu, 12 Oct 1995 17:34
18 lines
1119 bytes
Joe Buck <jbuck@synopsys.com> wrote:
>> 	/* now res is at most 32767+4 */
>> 	return (res < 32767) ? res : res - 32767;

djb@silverton.berkeley.edu (D. J. Bernstein) writes:
>Branching is bad. Look at the routines that use res, and rewrite them so
>that they won't mind inputs up to 32771.

The above code need not translate into a branch, in processors with a
conditional assignment or a suppress-operation bit, which many have.



-- 
-- Joe Buck 	<jbuck@synopsys.com>	(not speaking for Synopsys, Inc)
Anagrams for "information superhighway":	Enormous hairy pig with fan
						A rough whimper of insanity
Technical Details
Message-ID: <45jji9$7hp@hermes.synopsys.com>
Path: arc1-ca.pugleaf.net!news.synopsys.com!jbuck
References: <43tqr6$3au@mikasa.iol.it> <812838189snz@genesis.demon.co.uk> <4522pb$cid@hermes.synopsys.com> <1995Oct1102.48.02.1823@silverton.berkeley.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!news.synopsys.com!jbuck
From: jbuck@synopsys.com (Joe Buck)
Newsgroups: comp.arch,comp.arch.arithmetic,comp.lang.c
Subject: Re: % in hash table
Date: 12 Oct 1995 17:34:01 GMT
Organization: Synopsys Inc., Mountain View, CA 94043-4033
Message-ID: <45jji9$7hp@hermes.synopsys.com>
References: <43tqr6$3au@mikasa.iol.it> <812838189snz@genesis.demon.co.uk> <4522pb$cid@hermes.synopsys.com> <1995Oct1102.48.02.1823@silverton.berkeley.edu>
NNTP-Posting-Host: deerslayer.synopsys.com