Xref: utzoo comp.sys.ibm.pc.programmer:375 comp.sys.ibm.pc:46315 Path: utzoo!attcan!uunet!mailrus!tut.cis.ohio-state.edu!rutgers!mcnc!rti!tijc02!rdo031 From: rdo031@tijc02.UUCP (Rick Odle ) Newsgroups: comp.sys.ibm.pc.programmer,comp.sys.ibm.pc Subject: Re: How is a 68000 as fast as an 80386?? Message-ID: <908@tijc02.UUCP> Date: 13 Mar 90 13:55:14 GMT References: <3666@plains.UUCP> Distribution: na Organization: Texas Instr., Johnson City TN Lines: 47 From article <3666@plains.UUCP>, by harlow@plains.UUCP (Jay B. Harlow): > In article <505@bilver.UUCP> alex@bilver.UUCP (Alex Matulich) writes: >>Can someone help me with a puzzling problem? >> >>In my current C programming project, I have written some functions that >>perform statistical things on 400 separate data sets (linear regressions, >>..... >>Naturally, I wanted more speed, so I ported the program to an AT&T 386WGS >>at work, which is a 25 MHz 80386 IBM compatible. I compiled it using > ^^^^^^^ only creates 16-bit code.... >>Turbo C 2.0, large memory model. Then I watched in chagrined disbelief as >>that number-crunching section still took about a minute to execute -- > 16-bit code on 386 can you say lame duck (read below....) >>actually a few seconds longer than my Amiga. All source code was the same! >> >>5) I know the 80386 has special modes of operation, incompatible with >> previous chips, that allow it to run at its full potential. Is this >> the reason my program isn't running at its rightful speed? Are these > Yes partly, 1) 32-bit inst in real mode 2) 32-bit Protected mode >> special modes accessible when using DOS? If so, how? > > Alex, > the reason your program ran 'slow' on the 386 is because you compiled it > for a 286 (at best) LARGE model, a large model on a x86 means all addresses > have segment offset, haveing the x86 load segments is very 'expensive' > time wise (i normally use a small model & put large data out in far memory...) >........ more on small models The only fair test here is to do the test with large model. While it is true that the 80x86 processors will let you execute code in a small model architecture, this is only applicable to fairly small applications ( I know this is relatively speaking, and that 10 years ago 64k of code was a fairly large application). The 680x0 family architecture ALWAYS fetches long word addresses (32 bits), so the most fair comparision is the x86 large model. BTW, this very feature (large linear address space) on the 68k family is what makes it a somewhat more desirable processor to program on (no segments to wory about). On the other hand, the segmented architecture lends itself to being able to develop position independent code easier. rick -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- rick odle texas instruments industrial systems division (615) 461-2371 johnson city, tn 37601 __ . _ /__, uucp: mcnc!rti!tijc02!rdo031 ( ( (__ / ( -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-