Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!samsung!think.com!spool.mu.edu!news.cs.indiana.edu!maytag!watstat.waterloo.edu!dmurdoch From: dmurdoch@watstat.waterloo.edu (Duncan Murdoch) Newsgroups: comp.os.msdos.desqview Subject: Re: Qemm slows floating point Message-ID: <1991May15.145054.12574@maytag.waterloo.edu> Date: 15 May 91 14:50:54 GMT References: <22671@shlump.lkg.dec.com> Sender: news@maytag.waterloo.edu (News Owner) Distribution: na Organization: University of Waterloo Lines: 78 In article <22671@shlump.lkg.dec.com> reisert@mast.enet.dec.com (Jim Reisert) writes: > >In article <1991May14.142323.1929@maytag.waterloo.edu>, dmurdoch@watstat.waterloo.edu (Duncan Murdoch) writes... >>In article <1991May14.123233.17734@cbfsb.att.com> feg@cbnewsb.cb.att.com (forrest.e.gehrke) writes: >>>When I load qemm.sys and run a Whetstone benchmark (or any >>>floating point operations program), I find that there is >>>about a 30% reduction in speed. >> >>So it appears the only solution is to buy a 387 - then your program will >>be slower on the first pass through each instruction, but will go full >>speed after that. > >This doesn't seem right. I have a Cyrix coprocessor in my 386 box, and I >suffer similar speed penalties as Forrest, when using programs that make >heavy use of the coprocessor. It must be something else. > >Digital Equipment Corp. UUCP: ...decwrl!mast.enet!reisert Very mysterious. I wrote a little test program in Turbo Pascal (it's attached below), that just runs loops multiplying 16 bit integers, 32 bit integers, and 64 bit doubles. I calibrated it under Desqview so that each loop took 5 seconds on my 486-25 (which has the coprocessor built in). Times under various conditions are shown below; it sure looks as though QEMM has no effect when the floating point instructions are used, but causes a big slowdown when they're emulated. Duncan Murdoch Time in seconds Type Desqview QEMM Clean Number of cycles Integer 5.0 4.0 4.0 4150000 Longint 4.9 4.0 4.0 990000 FPU Doubles 5.0 4.0 4.0 2210000 Emul Doubles 6.4 5.2 3.7 60000 program timecalc; { Times integer and floating point arithmetic } uses opdos; { Object professional unit supplies the timer } var i,j : integer; i1,i2 : integer; l1,l2 : longint; d1,d2 : double; start,stop : longint; begin start := timems; i1 := 5; for i:=1 to 10000 do for j:=1 to 415 do i2 := i1*i1; stop := timems; writeln('Integers took ',(stop-start)/1000:8:3,' seconds.'); start := timems; l1 := 5; for i:=1 to 10000 do for j:=1 to 99 do l2 := l1*l1; stop := timems; writeln('Longints took ',(stop-start)/1000:8:3,' seconds.'); start := timems; d1 := 5; for i:=1 to 10000 do for j:=1 to 6 do { use 6 for 87=n, 221 for 87=Y } d2 := d1*d1; stop := timems; writeln('Doubles took ',(stop-start)/1000:8:3,' seconds.'); end.