home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / cplus / 19862 < prev    next >
Encoding:
Text File  |  1993-01-25  |  2.3 KB  |  53 lines

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