0

What is known about performance overhead with the "-g" flag (debug) of GCC? For small examples, I see no difference.

zell
  • 9,830
  • 10
  • 62
  • 115
  • What does the documentation for the `-g` flags say? – Surt Nov 30 '20 at 18:08
  • 1
    Zero difference, it just adds metadata (debug info) to other sections of the executable. That metadata works less well in optimized code (`-O3 -g`), e.g. you sometimes just get "optimized out" for local var values, especially if a loop was auto-vectorized. – Peter Cordes Nov 30 '20 at 23:47

0 Answers0