Using gcc or clang, I used -g option for compilation and without it for linking. Does that mean that the final binary is equivalent in performance to the one without -g option in the whole compilation process?
Usually it is considered a compiler bug if the performance of the binary with debugging information differs from the binary without. So, yes, you should expect the same performance.