What is known about performance overhead with the "-g" flag (debug) of GCC? For small examples, I see no difference.
Asked
Active
Viewed 27 times
0
-
What does the documentation for the `-g` flags say? – Surt Nov 30 '20 at 18:08
-
1Zero 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