home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sparky!uunet!gumby!wupost!monsanto.com!skws02!bcschu
- From: bcschu@skws02.monsanto.com (Brett Schultz)
- Subject: Re: Optimizing code for tests
- Message-ID: <1992Aug14.192350.4786@tin.monsanto.com>
- Sender: news@tin.monsanto.com (USENET News System)
- Organization: Monsanto Company
- References: <1992Aug12.200303.25050@tin.monsanto.com>
- Date: Fri, 14 Aug 1992 19:23:50 GMT
- Lines: 48
-
- bcschu@skws02.monsanto.com (Brett Schultz) writes:
- : I am writing a computationally expensive program now. In order to make it
- : run faster, I compiled each object using cc with the -j option and then the
- : entire thing with the -O3 option. This didn't run any faster than when I had
- : used the -g option. What can the compiler do to help the program run faster?
- :
- : My program is expensive also due to comparisons. I think that is what Jeffrey
- : L Bromberg was talking about. I think what he was asking is if the compiler
- : optimizes comparisons in your algorithm (right??). I don't know if he tried
- : to use the compiler optimization options. Try it and let me know what you get.
- :
- : Did I use the optimatization options correctly with cc, and if so, why didn't
- : it make my program faster.
- :
- : Any input will be helpful
- :
- : Thanks in advance.
- :
- :
- : Brett
- :
- : bcschu@skws02.monsanto.com
- :
-
-
-
- Many of you have sent me mail asking what system, compiler etc....
-
- I am using a sgi 240 and a unix OS.
- : run faster, I compiled each object using cc with the -j option and then the
- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
- cc is the compiler.
-
- Many of you have also suggested to look for bottlenecks in my program.
- I appreciate the info, but I have already found the bottlenecks and just
- thought that optimized code runs faster than non-optimized code (esp. when
- compiled with debugging info). However, my question was that when I compiled
- my code with, from what I understood from our man pages on cc, that one had
- to compile individual objects using a -j option. It is like the -O3 option,
- but for objects. Our cc compiler will not let me compile objects with the
- -O3 option. When I compile with -j, it produces a ".u" file. I wasn't really
- sure if I was compiling correctly, and what to do with the .u files.
-
- Sorry about the confusion and thanks for the input. I hope this clarifies
- things.
-
- Brett
-