home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / lang / fortran / 2835 < prev    next >
Encoding:
Text File  |  1992-07-25  |  2.6 KB  |  58 lines

  1. Newsgroups: comp.lang.fortran
  2. Path: sparky!uunet!sun-barr!ames!news.hawaii.edu!galileo!tholen
  3. From: tholen@galileo.ifa.hawaii.edu (Dave Tholen)
  4. Subject: Re: MS Fortran 5.1 upgrade. Is it worth it?
  5. Message-ID: <1992Jul25.220659.2257@news.Hawaii.Edu>
  6. Sender: root@news.Hawaii.Edu (News Service)
  7. Nntp-Posting-Host: galileo.ifa.hawaii.edu
  8. Organization: University of Hawaii
  9. Date: Sat, 25 Jul 1992 22:06:59 GMT
  10. Lines: 46
  11.  
  12. Luc Bauwens writes:
  13.  
  14. > The 32 bit apps run about 35% faster than the 16 bits MS apps.
  15.  
  16. I have found that the speedup depends on the relative amounts of I/O and
  17. number crunching.  WATCOM's I/O performance would appear to be slightly
  18. worse than Microsoft's, but in the number-crunching department, the
  19. 32-bit code wins handily, and by more than a factor of two.
  20.  
  21. I ran a simple benchmark that consisted of the following:  a DO loop that
  22. executes 1,000,000 times; inside the loop is a random number generator
  23. that provides a number between -1.0 and 1.0, and a statement that takes
  24. the arcsine of the random number and adds the result to an accumulator.
  25. Outside the loop, the value of the accumulator is written to standard
  26. output.  I discovered that the accumulation step was necessary to prevent
  27. WATCOM's optimizer from eliminating the arcsine step, which I put in there
  28. to make sure the coprocessor was getting used.  By the way, everything was
  29. in DOUBLE PRECISION.
  30.  
  31. Here are some timings on a 25 MHz 386/387 combination along with the compiler
  32. options used to generate the executable.  Note that WFL refers to the WATCOM
  33. product, while FL refers to the Microsoft product:
  34.  
  35.     74.36 sec     WFL386 /3 /OX
  36.     74.48         WFL386
  37.     80.67         WFL386 /OD
  38.    198.20         WFL386 /FPC
  39.  
  40.    162.67         FL -G2 -FPi87
  41.  1,532.35         FL -G2 -FPa
  42. 15,561.15         FL -G2 -FPi     with NO87=Coprocessor disabled
  43.  
  44. With the WATCOM product, it appears that OS/2 takes over the coprocessor
  45. emulation task, but OS/2 doesn't recognize the NO87 environment variable,
  46. so I never could get it to run the test without the coprocessor.  The
  47. factor of 100 speedup using the coprocessor with the Microsoft product
  48. is ridiculous.  Something must be going on that I don't understand.  I
  49. wish I had a system with 16-bit OS/2 version 1.3 installed to determine
  50. if the 32-bit operating system is somehow handicapping 16-bit programs
  51. that emulate the 80-bit arithmetic of the coprocessor.
  52.  
  53. Anyway, I am keeping the Microsoft compiler on my hard disk, simply
  54. because WATCOM does not (yet?) support the 16-bit Kbd, Mou, and Vio API
  55. calls.  It does permit full PM development using the 32-bit APIs, but
  56. they are only thinking about providing support for the old 16-bit APIs;
  57. no guarantee that it will happen.
  58.