Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!pasteur!ames!lll-winken!uunet!mcvax!ukc!acorn!moncam!paul From: paul@moncam.co.uk (Paul Hudson) Newsgroups: comp.lang.c Subject: Re: relative value of stripping symbols Summary: -g means no optimisation. Message-ID: <141@marvin.moncam.co.uk> Date: 21 Apr 89 12:26:47 GMT References: <17615@cisunx.UUCP> Organization: Monotype ADG, Cambridge, UK Lines: 22 In article <17615@cisunx.UUCP>, jcbst3@cisunx.UUCP (James C. Benz) writes: > Just a little question of some interest. Suppose I have a C program that > when compiled with the -g option (debugging symbols left in) (this is ATT > Unix Sys V). Does leaving these symbols in the file affect program > performance? Signifigantly? Reason for asking, I have an application .... With "normal" Unix C compilers, -g implies no optimisation. This of course will make your code run slower (usuallly!) than optimised code. It's quite difficult to debug code that has been optimised a lot, although often enough information can be obtained. GNU gcc allows -O and -g to be combined, and thus (except for disk space) there's never any reason to not use -g. Paul Hudson Snail mail: Monotype ADG Email: ...!ukc!acorn!moncam!paul Science Park, paul@moncam.co.uk Milton Road, "Sun Microsysytems: Cambridge, The Company is Arrogant (TM)" CB4 4FQ