Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!gem.mps.ohio-state.edu!wuarchive!wugate!uunet!crdgw1!crdos1!davidsen From: davidsen@crdos1.crd.ge.COM (Wm E Davidsen Jr) Newsgroups: comp.sys.ibm.pc Subject: Re: 32 bit C Comps and Long Summary: Here's why Message-ID: <1415@crdos1.crd.ge.COM> Date: 24 Oct 89 13:05:25 GMT References: <1224@utkcs2.cs.utk.edu> <1000@kosman.UUCP> Reply-To: davidsen@crdos1.UUCP (bill davidsen) Organization: GE Corp R&D Center Lines: 34 I think a lot of people are missing the point of the whole question. On a 386 32 bit arithmetic is a LOT faster. You don't need protected mode or anything fancy, just use the 32 bit instructions. Here's an example program: #include main() { long ary[2000], x = 4, y = 7; int ix, iy; for (ix = 0; ix < 2000; ix++) ary[ix] = ix+1200; for (iy = 4000; iy--; ) { for (ix = 0; ix < 2000; ix++) { ary[ix] = (ary[ix] + y) * x / y; } } } and the results. It was compiled using 386 and 286 instructions. 386 runtime: 36.50 sec 286 runtime: 121.66 sec Both times were on the same 25MHz machine, just using one set of instructions or the other. This is why I tell people not to buy a 286 any more, over the next few years there will be a lot of programs taking advantage of this 4:1 performance gain. I believe that the ZIP compressor does now. -- bill davidsen (davidsen@crdos1.crd.GE.COM -or- uunet!crdgw1!crdos1!davidsen) "The world is filled with fools. They blindly follow their so-called 'reason' in the face of the church and common sense. Any fool can see that the world is flat!" - anon