Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!maverick.ksu.ksu.edu!zaphod.mps.ohio-state.edu!usc!randvax!edhall From: edhall@rand.org (Ed Hall) Newsgroups: comp.sys.ibm.pc.hardware Subject: Re: 249 hours to generate MANDELBROT image on 286 Message-ID: <1991May4.003029.16362@rand.org> Date: 4 May 91 00:30:29 GMT References: <14697@encore.Encore.COM> <1991May2.124542.21865@engin.umich.edu> <1991May2.142752.23003@msuinfo.cl.msu.edu> Sender: usenet@rand.org Reply-To: edhall@rand.org Distribution: usa Organization: The RAND Corporation Lines: 32 Originator: edhall@ives Nntp-Posting-Host: ives In article <1991May2.142752.23003@msuinfo.cl.msu.edu> draper@buster.cps.msu.edu (Patrick J Draper) writes: >Isn't there an option to use either integer or floating point math? If >so, a coprocessor wouldn't save you anything in the integer mode. > . . . . >I'll bet that your friend's 386 is coonfigured for integer math, and the >286 machine is configured for floating point math. I believe that the later versions of fractint will use 32-bit integer instructions on a '386. Even without a coprocessor, all other things being equal this can easily be a factor of 2 (adds) to 4 (multiplies) faster. Also, the '286 is hard pressed to hold in registers everything needed in a mandelbrot inner loop (at two 16-bit registers per value); the 32-bit registers on the '386 can do this easily. Register-to-register operations are about twice as fast as register-to-memory, on average. Finally, the shifts necessary for such fixed-point arithmetic are a lot faster on a '386, which has a barrel-shifter, than the '286, which has to consume extra cycles for each bit shifted. Oh, and one last thing: the '386 uses an "early-out" multiplication algorithm, where multiply cycles are only performed until the multiplier runs out of significant bits. So I'd give the '386 a factor of eight or so based upon architecture alone. That times 4 for the clock still falls far short of explaining a 100:1 difference. However, if the calculations were floating-point, 100:1 sounds small for a non-coprocessor 8MHz '286 versus a 33MHz '386 with coprocessor. On some floating-point code I once ran for waveform synthesis, a non-CP 10MHz '286 was about 200 times slower than a 25MHz '386 with CP. (I'm assuming that the mandelbrot code is as FP-intensive, which it should be.) -Ed Hall edhall@rand.org