www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/02/10/14:39:58

From: frabb AT worldaccess DOT nl
Newsgroups: comp.os.msdos.djgpp
Subject: Antw: timing instructions [code, LONG]
Date: Mon, 10 Feb 97 12:47:41 GMT
Organization: World Access, Internet, E-mail and Videotex
Lines: 47
Message-ID: <N.021097.134741.15@skn2-11.worldaccess.nl>
References: <5dlh98$qrl AT gummy DOT cs DOT indiana DOT edu>
NNTP-Posting-Host: skn2-11.worldaccess.nl
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Aan 9-02-97 22:58, in bericht <5dlh98$qrl AT gummy DOT cs DOT indiana DOT edu>, Jeff Standish 
<jestandi AT cs DOT indiana DOT edu> schreef:

> Now, my question is, if you look at the two sets of results below, you'll
> see than they are almost identical, _except_ for integer +/-, which
> literally takes twice as long to run when Win95 is installed.  I'm
> baffled by the result.

When running your program several imes under win 3.11 I got inconsistent 
results. I think win does other things in the middle of your timingloop, I even 
got negative values several times!

>                    MS-DOS       Win95  (instructions per second)
>                   --------    --------
> int +:      33217359    16326061
> int -:      33221636    16386937
> 

I think the results of sinf are invalid:

> sinf():          1444230     1429516


>     for (index = 0; index < ITERATIONS; ++index) {
>   f1 = sin(f2);   f1 = sin(f2);   f1 = sin(f2);   f1 = sin(f2);
>   f1 = sin(f2);   f1 = sin(f2);   f1 = sin(f2);   f1 = sin(f2);
>     }
>     t2 = uclock();
>     for (index = 0; index < ITERATIONS; ++index) {
>   f1 = sinf(f2);  f1 = sinf(f2);  f1 = sinf(f2);  f1 = sinf(f2);
>   f1 = sinf(f2);  f1 = sinf(f2);  f1 = sinf(f2);  f1 = sinf(f2);
>   f1 = sinf(f2);  f1 = sinf(f2);  f1 = sinf(f2);  f1 = sinf(f2);
>   f1 = sinf(f2);  f1 = sinf(f2);  f1 = sinf(f2);  f1 = sinf(f2);
>     }

you are subtracting 8*sin from 8*sinf!

> -----------------------------------------------------------------------------
> Jeff Standish                  http://www.cs.indiana.edu/hyplan/jestandi.html 
>   

I added my favourite, long double, to your program. I am rather confused by the 
results. Is there any Intel publication available of the inner workings of the 
Pentium fpp?

frank abbing

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019