Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!watnot!ccplumb From: ccplumb@watnot.UUCP Newsgroups: comp.arch Subject: Re: Byte Order: On Holy Wars and a Plea for Peace Message-ID: <12250@watnot.UUCP> Date: Tue, 2-Dec-86 18:16:40 EST Article-I.D.: watnot.12250 Posted: Tue Dec 2 18:16:40 1986 Date-Received: Wed, 3-Dec-86 02:35:43 EST References: <1509@ihlpl.UUCP> <1335@hoptoad.uucp> <1364@hoptoad.uucp> <399@viper.UUCP> <228@watcgl.UUCP> Reply-To: ccplumb@watnot.UUCP (Colin Plumb) Organization: U of Waterloo, Ontario Lines: 16 Some people have argued that little-endian byte order is better for multi- precision arithmetic. I don't think this is true. If you're only using a few bytes, you add the low bytes, and then add the high bytes - with no change in efficiency for either order. But if you need to use a loop to do the 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.) Thus big-endian order is better. -Colin Plumb (ccplumbwatnot.UUCP) Zippy says: I was making donuts and now I'm on a bus!