relative value of stripping symbols
Guy Harris
guy at auspex.auspex.com
Sat Apr 22 17:13:40 AEST 1989
This is a UNIX question, not a C question....
>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?
No.
>If the program is well written and all other things being equal, will
>the program take longer to load and will it run slower with the symbols in?
Even if the program is horribly written, the code that implements "exec"
was written well enough that it doesn't bother reading the symbol table
- it doesn't have to. Unless somebody's botched "exec", it should take
no longer to load with the symbols in (modulo any small odd effects such
as the last block of the file being larger due to symbols appearing
there).
The code itself has no idea whether the symbols are present, so it
should run no differently with the symbols removed, no matter how well
written it is (unless, of course, it knows its own pathname and opens
itself to read the symbols, in which case it may not run at all with the
symbols stripped; in any case, it shouldn't run slower with the symbols
present).
More information about the Comp.unix.questions
mailing list