home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- From: dave@dhcs.demon.co.uk (Dave Hodgkinson)
- Path: sparky!uunet!pipex!demon!dhcs.demon.co.uk!dave
- Subject: Re: Optimized C++ library
- In-Reply-To: mahesh@elcaro1.ColumbiaSC.NCR.COM's message of Fri, 22 Jan 93 14:16:15 GMT
- Nntp-Posting-Host: dhcs.demon.co.uk
- Organization: IISC
- References: <1jng9aINN39s@male.EBay.Sun.COM> <1jofijINNm8o@rs2.hrz.th-darmstadt.de>
- <1993Jan22.091616.29891@ncrcae.ColumbiaSC.NCR.COM>
- Apparently-To: mail2news@news.demon.co.uk
- Date: Mon, 25 Jan 1993 14:19:17 +0000
- Message-ID: <DAVE.93Jan25130847@dhcs.demon.co.uk>
- Sender: usenet@demon.co.uk
- Lines: 37
-
-
- In article <1993Jan22.091616.29891@ncrcae.ColumbiaSC.NCR.COM> mahesh@elcaro1.ColumbiaSC.NCR.COM (Mahesh Zambani) writes:
-
- In article <1jofijINNm8o@rs2.hrz.th-darmstadt.de>, schrod@iti.informatik.th-darmstadt.de (Joachim Schrod) writes:
- |> In article <1jng9aINN39s@male.EBay.Sun.COM>, pauln@loopkill.EBay.Sun.COM (Paul Nguyen) writes:
- |> >
- |> > We have an application that runs OK when all the libraries were compiled with the
- |> > -g option. But when the libraries were re-compiled with -O for optimization. The
- |> > application seems to crash randomly in one of the library.
- |> >
- |> > Is it possible that compiling with -O uncovered a bug?
- |>
- |> Yes, in the compiler. Might be that you use the CC of Sun? (0.5 :-)
- |>
- |> --
- |> Joachim
-
- I had the same problem on HP9000/700 and SCO V3.2. But I discovered
- that only few source files were problematic. By compiling these without
- -O flag and compiling rest of the files with optimization, my application
- ( quite a big size ) worked correctly.
- Off course, this depends on how many man hours you are ready to spend
- to save a few cpu (micro)seconds!! :-)
-
- There are often caveats to optimisation use buried deep in the manual.
- Sun, HP, MS and borland have all got such notes in my experience. You
- should try to isolate the faulty code; you will probably find that the
- compiler is making invalid assumtions in moving code out of loops or
- somesuch.
-
- Dave
-
- --
- Dave Hodgkinson | Nearest thing to a Chief Wizard at IISC | +44 71 628 6960
- S:10 I:17 W:8 D:14 C:13 Ch: 15 About to die: daveh@cix.compulink.co.uk
- Direct, to my desk, three times a day ... dave@dhcs.demon.co.uk
- This message brought to you by the most excellent Demon Internet Service
-