home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PROGRAMS / UTILS / HARDWARE / SAVAG387.ZIP / READ.ME next >
Encoding:
Text File  |  1990-02-25  |  1.4 KB  |  44 lines

  1.  
  2.     I was browsing some old DDJs the other day and came across
  3. a crusty benchmark called the savage floating point benchmark.  
  4.  
  5. Specifically, here is the c src for the 'savage':
  6.  
  7. #include <stdio.h>
  8. #include <math.h>
  9. #define ILOOP 25000
  10. main()
  11. {
  12.     int i;
  13.     double a=1;
  14.  
  15.     printf("start\n");
  16.     for(i=0; i<ILOOP; i++)
  17.         a=tan(atan(exp(log(sqrt(a*a)))))+1.0;
  18.     printf("a = %20.14e\n",a);
  19.     printf("done\n");
  20. }
  21.  
  22. Not really a serious attempt at a benchmark but it gave those Z80s some-
  23. thing meaty to chew on.  It took several minutes of interpreter time
  24. to slog through the savage on those venerable cpm machines.
  25.  
  26. Wondering what modern wonders had wrought, I became curious of the 
  27. speedup affording by present-day hardware.  In TC, the c src version 
  28. ran in 9.4 seconds on my 20 MHz 386/387 box.  Being something of a speed 
  29. aficianado, I decided to take it 'to the limit'.  The enclosed file, 
  30. sav387.asm, is the result.  It is an inline 80387- specific version that 
  31. runs at 3.4 seconds/pass on a 20 MHz 30837.  Firing up the Micronix 33 MHz 
  32. cached machine brought in a time of 1.62 seconds/pass.
  33.  
  34.     If anyone out there has a Cyrix 387/33, I'd be interested in 
  35. hearing the execution time for this test.  Ditto for Weitek (sp?) and
  36. the 80486.
  37.  
  38.                 Ray Berry
  39.                 Bellevue WA
  40.                 CIS 73407,3152
  41.                 exec-bbs
  42.                 comp conn pcboard 202 547 2008
  43.                 uucp ...ole!ray
  44.