Find the answer to your Linux question:
Results 1 to 4 of 4
Hi I am using the g++ compiler to compile the program on centos 5. I would like to know Whether the program compiled with -gdb3 or -g option run slows? ...
  1. #1
    Just Joined!
    Join Date
    Jun 2008
    Posts
    15

    Program compiled with -ggdb3 switch run slow

    Hi

    I am using the g++ compiler to compile the program on centos 5.

    I would like to know
    Whether the program compiled with -gdb3 or -g option run slows?
    like g++ -ggdb3 SampleProgram.cpp run slow in compare to compiled without -g option

    Thanks
    Ritesh

  2. #2
    Just Joined!
    Join Date
    Jun 2008
    Posts
    15
    Any comments on this?

  3. #3
    Linux Engineer wje_lf's Avatar
    Join Date
    Sep 2007
    Location
    Mariposa
    Posts
    1,192
    Well, I googled:
    Code:
    ggdb3 slow
    and discovered that, yes, folks expect the compiler to produce slower code when the -ggdb3 option is used.

    Exactly why, I don't know. Perhaps there are certain optimizations which are ordinarily compiled into the code but which are omitted if you're going to use gdb, because if they were included, then the debugging experience would be misleading and confusing.

    Just a guess.
    --
    Bill

    Old age and treachery will overcome youth and skill.

  4. #4
    Just Joined!
    Join Date
    Jun 2008
    Posts
    15
    Thanks a lot.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...