home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / os / os2 / programm / 3685 < prev    next >
Encoding:
Internet Message Format  |  1992-07-21  |  974 b 

  1. Path: sparky!uunet!darwin.sura.net!mips!swrinde!elroy.jpl.nasa.gov!nntp-server.caltech.edu!brooke
  2. From: brooke@cco.caltech.edu (Brooke Paul Anderson)
  3. Newsgroups: comp.os.os2.programmer
  4. Subject: Weird gcc effect when compiling a benchmark prog.
  5. Message-ID: <1992Jul21.110954.4347@cco.caltech.edu>
  6. Date: 21 Jul 92 11:09:54 GMT
  7. Sender: news@cco.caltech.edu
  8. Organization: California Institute of Technology, Pasadena
  9. Lines: 8
  10. Nntp-Posting-Host: kanga
  11.  
  12. I was compiling a simple floating-point benchmark program, and I
  13. noticed that it gave me different results depending on whether or
  14. not I had a printf statement in the code.  The odd thing is that the
  15. printf statement was entirely out of the timing loop, so it shouldn't
  16. have any effect at all on the performance measure spit out by the
  17. program.  Nevertheless, it has an effect.  Has anyone ever seen something
  18. like this?  I can supply the code if people would like, so they can
  19. test it -- the program is about 100 lines long.
  20.