home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / lang / c / 12268 < prev    next >
Encoding:
Text File  |  1992-08-12  |  1.2 KB  |  34 lines

  1. Newsgroups: comp.lang.c
  2. Path: sparky!uunet!wupost!monsanto.com!skws02!bcschu
  3. From: bcschu@skws02.monsanto.com (Brett Schultz)
  4. Subject: Re: Optimizing code for tests
  5. Message-ID: <1992Aug12.200303.25050@tin.monsanto.com>
  6. Sender: news@tin.monsanto.com (USENET News System)
  7. Organization: Monsanto Company
  8. References: <1992Aug12.153158.13990@squid.tram.com>
  9. Date: Wed, 12 Aug 1992 20:03:03 GMT
  10. Lines: 22
  11.  
  12. I am writing a computationally expensive program now.  In order to make it
  13. run faster, I compiled each object using cc with the -j option and then the
  14. entire thing with the -O3 option.  This didn't run any faster than when I had
  15. used the -g option.  What can the compiler do to help the program run faster?
  16.  
  17. My program is expensive also due to comparisons.  I think that is what Jeffrey
  18. L Bromberg was talking about.  I think what he was asking is if the compiler 
  19. optimizes comparisons in your algorithm (right??).  I don't know if he tried
  20. to use the compiler optimization options.  Try it and let me know what you get.
  21.  
  22. Did I use the optimatization options correctly with cc, and if so, why didn't
  23. it make my program faster.
  24.  
  25. Any input will be helpful
  26.  
  27. Thanks in advance.
  28.  
  29.  
  30. Brett
  31.  
  32. bcschu@skws02.monsanto.com
  33.  
  34.