Re: Hi, Glade problem (another question)



On Sat, 17 Mar 2001, Ralf Corsepius wrote:

A bit OT, but could anyone explain to me why the -g option is enabled
by default in configure scripts. 
The autoconf default is -g -O2.

This is a compromise between the demands wrt. optimization and the
ability to be able to debug.

I didn't notice until recently, I was
left wondering why things I compiled from source had such large filesizes
and ran so slowly.
-g -O2 compiled binaries normally are not significantly slower than
-O2 compiled binaries (unless your machine starts swapping due to
the additional overhead in size). 

Perhaps it was my imagination then. I upgraded my gnome and gtk libraries
from source and I'm fairly sure it had a significant effect on performance
until I recompiled. Perhaps it was swapping like you say. Also I've used
-g on Fortran compilers where it also implies no optimisation, so I
assumed it was the same with gcc (not the case as the man page tells
me...)

even when developing I've not yet needed to wheel out the debugger.
Then there still might be things to discover for you :)

Undoubtedly!

I've only used a debugger once (on someone elses code). It's going to
take a lot to get me to do it again :)

Oh well, thanks for reassuring me that it's not completely brainless,
though I think I'll stick to turning it off by default in my code!

Martin.





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]