🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #12764

Re: Byte Order: On Holy Wars and a Plea for Peace

#12764
From: Chris Torek
Date: Wed, 03 Dec 1986 21:25
25 lines
1687 bytes
In article <12250@watnot.UUCP> ccplumb@watnot.UUCP (Colin Plumb) writes:
>But if you need to use a loop to do [an extended precision] addition,
>on the vast majority of CPU's it's quicker to start at the highest
>address and go down to zero, saving a comparison each time 'round the
>loop. (Of course, if you're counting from a to b, neither of which are
>zero, then you have equality again.)

But it is easy to argue that you are always counting from a to b,
if you are working with addresses.  At most one valid address in
any machine may be zero; ergo, chances are you are working with a
nonzero address.  If instead you count your steps, it hardly matters
which way the addresses increment:

	*a++ += *b++;		/* regular add for the first word */
	while (--count > 0)	/* extended add for the rest */
		*a++ <extended +=> *b++;

or

	*--a += *--b;		/* regular add for the first word */
	while (--count > 0)	/* extended add for the rest */
		*--a <extended +=> *--b;
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7690)
UUCP:	seismo!mimsy!chris	ARPA/CSNet:	chris@mimsy.umd.edu
Technical Details
Message-ID: <4645@mimsy.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!mimsy!chris
References: <1509@ihlpl.UUCP> <1335@hoptoad.uucp> <1364@hoptoad.uucp> <12250@watnot.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!mimsy!chris
From: chris@mimsy.UUCP (Chris Torek)
Newsgroups: comp.arch
Subject: Re: Byte Order: On Holy Wars and a Plea for Peace
Message-ID: <4645@mimsy.UUCP>
Date: Wed, 3-Dec-86 16:25:22 EST
Article-I.D.: mimsy.4645
Posted: Wed Dec  3 16:25:22 1986
Date-Received: Wed, 3-Dec-86 22:50:20 EST
References: <1509@ihlpl.UUCP> <1335@hoptoad.uucp> <1364@hoptoad.uucp> <12250@watnot.UUCP>
Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742
Lines: 25